DCSIMG
April 2011 - Posts - Ariel ITzhaky

Ariel ITzhaky

It's all working till you fix it ...

April 2011 - Posts

The 'PLUS' in DocumentSpecName

In some real-life scenarios, deploying several BizTalk schemas on the same box, as a schema versioning solution or not, can cause multiple identical message types with the same namespace and root element name. Due to same exact message schema deployed twice (or more) or different schemas for different messages, but with the same root element and namespace.

The known error that pops out when naively executing the scenario described is as followed:

Event Type:  Error

Event Source: BizTalk Server 2006

Event Category:      BizTalk Server 2006

Event ID:       5804

Date:              31/02/2010

Time:              13:31:30

User:              N/A

Computer:    MyComputer

Description:

An error occurred while processing the message, refer to the details section for more information

Message ID: {0B9ACC4F-229E-4DED-B954-84D3A226A0F6}

Instance ID: {11AD3CA1-0822-4B0A-BFF5-14CDA801A094}

Error Description: There was a failure executing the response(receive) pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Send Port: "MySendPort" URI: "http://localhost/MyService.asmx" Reason: Cannot locate document specification because multiple schemas matched the message type "<namespace>#<root name". 

The use of "DocumentSpecName" attribute in the configuration section of the pipelines (e.g. XmlReceivePipeline) is there to direct the pipeline to validate the message against a specific schema in the given assembly.This should solve the above error.

 

The issue is a bit complex when multi-part schemas are involved. After doing the DocumentSpecName magic, when dealing with multi part schema the validation section still can't resolve the unique schema to act with. The error in such case is:

Event Type:  Error

Event Source:          BizTalk Server 2006

Event Category:      BizTalk Server 2006

Event ID:       1001

Date:              31/02/2010

Time:              13:41:56

User:              N/A

Computer:    MyComputer

Description:

There was a failure executing the response(receive) pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Send Port: " MySendPort " URI: " http://localhost/MyService.asmx" Reason: No Disassemble stage components can recognize the data ".

What BizTalk want to tell us is that at this stage, given the specific configuration of DocumentSpecName Attribute, in the well known syntax of "<schema type> ,<schema assembly full name>" is not enough for multipart schemas.

So after some research, I found that a little mending is needed to my DocumentSpecName configuration. The above value syntax is not enough, because it will direct the pipeline to the desired schema in the assembly, but still which root in the multipart schema to validate against.

So the fixed syntax is as followe:

"<schema type>+<root name> ,<schema assembly full name>"

After providing the above configuration all works great.

Hope this will help someone in the globe.

Ariel