Yossi Dahan [BizTalk]

Google
 

Wednesday, December 03, 2008

What I hadn’t appreciated about schema versioning in BizTalk Server

Most people know that when processing a message through the XmlDisassembler, if not explicitly told which schema to use through configuration, the disassembler would try to resolve the correct schema based on the message’s root node and namespace.

Most would also know, usually through the experience of getting it wrong so many times first, that if more than one assembly contains the same combination of root node and namespace for a schema, the receive pipeline, containing the disassembler, would fail with the error  “Cannot locate document specification because multiple schemas matched the message type “<your message type here>”.”

What some miss (ehm, ehm) is that this is not true if the two schemas exist in two versions of the same assembly.

So – if you have an assembly called MySchemas.dll, version 1.0.0.0, …. which contains schema SomeRootNode#SomeNamespace and you have MySchemas2.dll, Version…… which contains schema SomeRootNode#SomeNamespace (same one) – BizTalk would fail.

If, however, you have the assembly MySchemas.dll, version 1.0.0.0, …. which contains schema SomeRootNode#SomeNamespace and then create MySchemas.dll, version 2.0.0.0, …. which contains schema SomeRootNode#SomeNamespace BizTalk would quite happily ignore the former and use the latest version available.

Makes perfect sense, of course!

Labels: , ,

2 Comments:

  • This will not work when a element in version 2 changes from let's say string to integer, and you still have an old assembly that wants to use the element as a string...

    By Anonymous Anonymous, at 30/11/2009, 12:49  

  • you are right, of course, all I meant is that BizTalk will now always pick up the later version; what that means to the various processes/components has to be carefully evaluated, of course.

    By Blogger Yossi Dahan, at 01/12/2009, 08:24  

Post a Comment

<< Home