Failed to Serialize the Message Part, Ensure that the Message Part Stream is Created Properly

Encountered the following error today on a SOAP [Send] Port:

Failed to serialize the message part “[PART NAME]” into the type “[MESSAGE TYPE]” using namespace “[NAMESPACE]”. Please ensure that the message part stream is created properly.

The error is a little misleading, especially ‘ensure that the message part stream is created properly‘ – the message part stream is created correctly, but it does not match the type contained within the SOAP adapter proxy and therefore fails to serialize. In our case, we were trying to serialize an element with the string ‘Stan’ into a boolean. With the best will in the world, that isn’t going to happen!

To check where the problem lies with serialization, simply validate the failed message (retrieved from the Admin Console) against the schema generated from the WSDL, using the Visual Studio ‘Validate Instance‘ schema menu option. You’ll be presented with a list of errors that can then be resolved.

Our problems went a lot further and resulted in a fairly impressive hacky bodge that I am extremely proud of, especially on a Friday at 5pm (with a Bank Holiday weekend waiting for me). I’ll spare you that for another post!

Fix to see C# Generated from Orchestrations in BizTalk 2006

In the good old days of BizTalk 2004 (who am I kidding?!?), compiling a project that contained an orchestration resulted in the C# generated from the XLANG/s to be placed in the same directory, allowing you to put your C# guru hat on and review the code.

While trying to decipher a cryptic BizTalk error message today, I decided to go delving into the generated C# to try and figure out which shape related to ‘segment2’. It turns out that by default, BizTalk 2006 doesn’t provide this functionality.

Thankfully, Arnulfo Wing has sorted this out and provided the instructions to re-enable this helpful piece of functionality through some registry settings and a Visual Studio restart. I haven’t come across his blog before, but it has some great content on all things BizTalk – I suggest you check it out:

Red Gate to be responsible for future development of the .NET Reflector

As announced on the Simple-Talk blog, Red Gate software will be responsible for the future development of .NET Reflector, the popular tool authored by Lutz Roeder. Red Gate will continue to offer the tool for free to the community.

I think this is great news for an already excellent tool and although there doesn’t appear to be any enhancements already in the pipeline, the Red Gate team plan on going out into the community to get suggestions on how to make the tool even better.

.Net Reflector can be downloaded from the Red Gate website at:

London, New York, Paris!

I’ve just spent a great weekend in London with the parents, doing the tourist ‘thing’ (the photo above was taken from the London Eye); In September I’m off to New York for my 30th, then in November I’m off to Paris and Egypt – I think I’ll need Christmas off to recover!!

I’m really overwhelmed with what to do when I go to New York – does anyone have any suggestions for must see attractions? I’ve already pencilled in the Empire State Building, the Statue of Libery, the Guggenheim Museum and a Broadway show (which one?!?). Any other recommendations?

Error when expanding ‘Application’ in the BizTalk 2006 Admin Console

Originally posted by Nick Heppleston on his blog at:

Update: There have been a few comments to this post (see below) and it would appear that this problem is either due to WMI or the DTS service. If you are encountering this problem, I suggest that you investigate restarting these two services before going for the full-blown server restart. Thanks to Mike, Hema and Per for help in resolving this one.

Yesterday we encountered a worrying blocking error when expanding the Application node under a BizTalk Group in the 2006 Administration Console:

Failed to create ApplicationNode (Microsoft.BizTalk.SnapIn.Framework)

Additional Information:
Exception has been thrown by the target of an invocation. (mscorlib)
Failed to enable constraints. One or more rows contain values violating non-null , unique or foreign-key constraints. (System.Data)

All of the servers in the Group were affected, this suggested to me that there was some corruption in the management database given that we had been performing a deployment of new assemblies just before it occurred.

One possible resolution to the problem – repair the BizTalk installation – was discussed on MSDN, but that didn’t appear to work in our case; Instead, restarts of all the servers in the Group (3 servers in total) resolved the problem.

Not a satisfactory resolution, but one which worked nonetheless; we’ll be keeping a close eye on the environment in future….