0
votes

I've received a schema containing multiple root nodes from a customer, and an example XML file that contains a single root node. The nodes in the schema each reference each other, starting with the top node. I've created a map that uses this schema for use in BizTalk and deployed the map and schemas. However when sending the document through BizTalk, the following error is thrown:

StackTrace: at Microsoft.BizTalk.Component.Interop.DocumentSpec.get_TypeMetadata()
at Microsoft.BizTalk.Component.Interop.DocumentSpec.get_DocType()
at Microsoft.BizTalk.Component.MsgTypeSchema..ctor(IPipelineContext pipelineContext, SchemaList envSpecName, SchemaList docSpecName) at Microsoft.BizTalk.Component.XmlDasmReader.CreateReader(IPipelineContext pipelineContext, IBaseMessageContext messageContext, MarkableForwardOnlyEventingReadStream data, Encoding encoding, Boolean saveEnvelopes, Boolean allowUnrecognizedMessage, Boolean validateDocument, SchemaList envelopeSpecNames, SchemaList documentSpecNames, IFFDocumentSpec docSpecType, S

I'm unsure how to read it, but it would seem like the message is missing some needed metadata. The message is being suspended as well.

To give you an idea of how the schema looks in visual studio:

enter image description here

In BizTalk, each of the nodes are created as a separate schema, with a different root node, but the same target namespace, name and assembly. Why can't BizTalk route the document to the correct schema? Do I need to perform some changes to the current schema? The documents being sent all have a single root node with a target namespace included.

I've tried redeploying the maps and schemas, restarting host instances and removing/adding the target namespace, nothing has worked so far. There are a few schemas in BizTalk with the same root node, but a different target namespace. I'm unsure if these could cause issues.

1

1 Answers

0
votes

Click on the schema, and in the Properties window look for an item called Root Reference and set that to the root element

Root Reference item property

If they have different namespaces, then no those won't cause an issue.