Geeks With Blogs
Stephen W. Thomas BizTalk Blog 100% Pure BizTalk

This is always a point of confusion.  I just wanted to take a second to get everyone on the same page since these properties are VERY important.  If you are a solo developer or you have never renamed a root node, then you may not understand the importance of these properties.

 

First off, what are they?

 

Node Name: This is the name that is displayed inside Visual Studio for the root node in the schema and for each field element in a property schema.

 

Root Node Type Name:  Basically, this is what BizTalk will call your root node.  This does not have to be the same as the Node Name, thus the potential for confusion.  This will default to the same name as your root node name when you first create the node or when you rename the root node by changing the Node Name property.  But, it is possible to change the Root Node Type Name, either by accident or on purpose, to something else that is non-meaningful to anyone.

 

Ok, but how will this really effect me?

BizTalk sets a message context property called BTS.MessageType.  This is a concatenation of the document namespace and Root Node Name.  This message type property will show up in HAT and can also cause problems when working with non-unique root nodes with no namespace, but that is a whole other post.

 

What purpose does this serve?

This will allow you to have two schemas with no namespace or the same namespace and the same root node name, but different root node type name.  The benefits of this may not be obvious, but it will allow you to set the message type property inside the pipeline.  This is required if you want to use the message for routing, mapping, or inside a strongly typed orchestration. 

If you do have two messages with no or the same namespace and the same root node type name you may get the follow error at runtime:

There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive" Source: "XML disassembler" Receive Location: "d:\bt\in\*.xml" Reason: The disassembler cannot retrieve the document specification by using this type: "Root123". Either the schema is not deployed correctly, or more than one schema is deployed for the same message type. 

The same holds true for schemas name and type name on the file properties of a schema.  The schema name has a Type Name property that is used inside the BizTalk Type Picker to reference that schema.  If this name gets changed on accident, it may become difficult for other developers to reference your schema.

 

CRITICAL: Unlike the Root Node, the file Type Name property will NOT change if the schema is renamed.

 

Take Away: Be mindful of the Type Name properties on the file and root node level and double check them to make sure they are set correctly.

 

Posted on Thursday, July 29, 2004 4:08 AM | Back to top

Copyright © Stephen W. Thomas | Powered by: GeeksWithBlogs.net | Join free