Schema file type name collision

Whilst putting together some schema files for BizTalk I came across this error:

“This schema file has a TypeName that collides with the RootNode TypeName of one of its root nodes. Make sure that they are different”

This signifies a collision between the type name that BizTalk allocates to the schema file itself (specified in the properties window after clicking on the file) and one of the type names specified for a root node inside the schema (specified by the property of the root node called ‘RootNode TypeName’).

The magic property to fix this problem is ‘Root Reference’ (in the properties for the <Schema> entry at the top of the node tree). This identifies the root node type that corresponds to the type for the schema. The default behaviour is to pick the first root node, and if the root node that shares a type name is not the first then you’ll see this error. Simply change the property to the relevant node and compile away.

In my scenario, I’d included a different schema that contained a number of complextype definitions. This pushed the root element down so it was no longer the first root node and this error popped up.

See http://msdn2.microsoft.com/en-us/library/aa561450.aspx

Advertisements

4 Responses to “Schema file type name collision”

  1. Martin Bring Says:

    Thank you!

    I stumpled into to this issue a couple of times lately and ended up renaming the type. Your solution is what I really want to do.

  2. Syed Junned Kazi Says:

    Thanks for making my day !

  3. Matt Mitchell Says:

    Oh thanks! I thought this was a clash *within* the schema and couldn’t work out what I was missing.

  4. Exultant Consultant (@huemoe) Says:

    thank you

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: