-
-
I've been struggling the last two days to deploy a custom BizTalk adapter using a merge module. My idea was to deploy the binaries and add the necessary registry keys using standard installer technology and then run a custom script to register the adapter in BizTalk using WMI. It didn't work in one go.
If you create a adapter project using the
adapter wizard, a registry file gets created as well that you need to merge into the registry to get the stuff working. These keys are all in the space HKCR\CLSID\
<yourkey>. As you can read in this
Registry Architecture article from the
Windows IT Library the HKCR is in real life a merged key consisting of the HKLM\Software\Classes and the HKCU\Software\Classes keys. So computer settings and user settings in one place. What happens if you create a key there? I don't really know, but it turns out that in most cases exactly what you want (the adapter works) but in some case not. In my case it didn't.
When I ran my setup the installation succeeded but the WMI script failed. When I monitored using RegMon from
www.sysintenals.com, it turned out that the WMI Service (wmiprvse.exe) tried to read the HKCU\CLSID\<mykey> value and it couldn't.
Since I think an adapter is a computer owned object, I decided that the keys needed to be computer settings, so instead of adding them to HKCR\CLSID, I added them to HKLM\Software\Classes\CLSID and now the WMI script does succesfully register.
For the interested few, here's the WMI script that registers an adapter in BizTalk using C# (this script requires you to reference System.Management both as a DLL and as a using statement):
PutOptions options = new PutOptions();
options.Type = PutType.CreateOnly;
//create a ManagementClass object and spawn a ManagementObject instance
ManagementClass newAdapterClass = new ManagementClass("root\\MicrosoftBizTalkServer", "MSBTS_AdapterSetting", null);
ManagementObject newAdapterObject = newAdapterClass.CreateInstance();
//set the properties for the Managementobject
newAdapterObject["Name"] = "<your adapters name>";
newAdapterObject["Constraints"] = "<yourconstraints>"; //see the registry file!!
newAdapterObject["MgmtCLSID"] = "<your adapter clsid>"; //see the registry file!!
//create the Managementobject
newAdapterObject.Put(options);
System.Console.WriteLine("Adapter has been created successfully");
-
-
Now this is something I could have used in my current project where I need to tie Oracle and BizTalk together. We now go via the filesystem, with all issues like no garanteed delivery, no garanteed message order, etc. We could have solved these issue much easier when we would have used MQSeries.
The announcement by Scott Woodgate is here, the download is here.
-
-
I read my blogfeeds webbased via Bloglines for quite a while now and I love it, because whether I am at home or at work, I always have the same feeds available, with the right status of what I have read.
But while Bloglines did come a long way, they just can't beat a native Windows blogreader in usability. That is going to change. Yesterday an announcement was made that Bloglines will have a web service interface, with some major windows based blogreaders supporting it. So, feeds and read status are centrally managed, yet you have the power of a windows client app. Great stuff.
-
-
It made me rethink about some of the issues I had in the past that I couldn't get to work in the way I expected it to. It re-emphasizes the value of knowing what is really going on.
-
-
I've worked with Commerce Server, Content Management Server and SharePoint a lot in the past and with all these products I eventually came into a position where something was broken or didn't work as expected and querying the database was really the last resort. So I think that this kind of documentation is invaluable. Great job.
-
-
BizTalk 2004 allows you to have multiple rootnodes in one schema. I thought that this was a nice way to capture a contract having multiple messagetypes in one document, so I use this in my current project. Since BizTalk identifies a messagetype by it's namespace/rootnode combination, I didn't really expect any problems with that.
But I just keep on running into issues that makes me wonder. The latest one I discovered just now.
I receive all message through the same receiveport and I want to map those messages to some central datamodel. Turns out that I can't. As soon as I specify one of the maps, the other ones dissappear from the list! Incredible. And I had more of such issues. I don't have the time to dive in now, but I hope to blog about those soon as well.
I just wonder if I misunderstand the value of multiple rootnodes and I shouldn't be wanting this or my approach in itself is good, but BizTalk is limited (and if so I like to know why). Any comments very appreciated.