Scott Woodgate's OutBursts

Error conditions: This (Dis)Assembler cannot retrieve document specification by using this type

Seeing as though I've answered it in email a few times let's do it for everyone. This error message can mean one of two things:

1. You don't have a schema deployed with a typename that matches the instance document coming through the system (that's a pretty obvious conclusion to draw from that message I hope)

2. You have MORE THAN ONE schema deployed that matches the typename which is a far more subtle conclusion to draw from the same error message. We do a lookup on typename and see two schema deployed and can't choose without user guidance which one to use.

The second condition actually happens more regularly than you would initially think.

 For example: If you use the web-services “add web ref“ a reference.xsd schema is added to your project and if this schema was already deployed on your system you now have two copies.

So how do you get around this issue? One option is to reduce to a single schema - but that's not always possible. Another is to go ahead and create a custom pipeline (send or receive depending on what you are trying to do). Drag in the assembler/dissasembler (eg. XML) and set the property “Document Schemas“ explicitly to point to the typename you want. That way we don't do a look-up and your error magically disappears....

Published Monday, June 07, 2004 9:40 AM by scottwoo

Comments

 

URI Reference clashes said:

It seems the suggested approach doesn't work. I have several schema's under SOAP envelope namespace (don't ask why :). I applied the solution stated above but the error remains.

Document spec is specified in the Document schemas list on the XML Disassembler component.
the CLR type selected is something like: "SomeAssembly.SomeSchemaFileBaseName+Envelope".

I need to receive the entire SOAP envelope in BizTalk so I have the SOAP Headers available for mapping. To receive these messages in a typed matter I created a new schema, copied the SOAP schema into it and added the elements I expect to receive in the SOAP Header and Body elements.

In short multiple document specs exist under the SOAP envelope namespace and the error remains.

Any suggestions on mapping SOAP Header content to a message body?

(By the way I do not use the SOAP Adapter, I use a MQ transport adapter)
June 9, 2004 6:00 AM
 

Viktor said:

Hi Scott,

The http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sdk/htm/ebiz_prog_pipe_mlsw.asp?frame=true article says:

"Pipeline components that receive XML messages determine the message type by examining the message root element and namespace. If a schema does not have a namespace defined for it, the message type is "<rootNode>".

I have an XML instance coming out of a third-party system and it does not carry the "xmlns" attribute: <DocumentType1>...</DocumentType1> for example. So I created a schema with targetNamespace="DocumentType1" and deployed it to the BizTalk Server. However, when I submit the message I get the following error:

"The disassembler cannot retrieve the document specification by using this type: "DocumentType1". Either the schema is not deployed correctly, or more than one schema is deployed for the same message type."

So apparently BizTalk can not resolve the schema. I also tried setting targetNamespace to "http://DocumentType1", "http://BizTalk_Server_Project1.DocumentType1"">http://BizTalk_Server_Project1.DocumentType1", "http://tempuri.org/DocumentType1" nothing worked. As soon as I change the instance to something like "<ns0:DocumentType1 xmlns:ns0="http://BizTalk_Server_Project1.DocumentType1"">http://BizTalk_Server_Project1.DocumentType1">...</ns0:DocumentType1>" and deploy the schema with targetNamespace="http://BizTalk_Server_Project1.DocumentType1"">http://BizTalk_Server_Project1.DocumentType1" it works fine, but this is not something I can get out of the third-party system. I do not like the idea of hardwiring the schema in a custom pipeline component to solve the issue.

I would really appreciated if you could help me getting this to work, Thanks,

Viktor
June 28, 2004 12:17 PM
 

Raj said:

Have you guys found anything more on this, Iam kinda facing the same scenario.
Also I have some more questions which Iam having a hard time to find the right solution

1. Biztalk XSD validation
Iam trying to validate a bunch of schemas as part of the biztalk project and all these schemas refer external schemas which are
also part of the project.When I try to validate it, I end up getting the following error
"The Schema has a TypeName that collide with the RootNode TypeName of one of its root nodes. Make sure that they are different"

When I try to validate other XML tools (XMLSpy) it validates well and good.So is this above error something unique to MSXML?

The weird thing is when I change the XML schema name to something else it works fine even within MSXML.

I would be more happy to share the solution file containing the schemas who would be interested(Iam using MSXML4.0 SP2)

2. Message creation
Ok, After changing the XSD filename as I said above, Iam able to generate an assembly out of it and place it in GAC
Now in my biztalk orchestration , When I try to define a message by pointing to one of the schemas as the message type, it doesnt allow me to select the entire schema rather it allows me to use one of the types under it!
Why cant I have my message type as the entire schema?


3. XmlValidatingReader
Is the biztalk engine XML validator same as the XmlValidatingReader class?Because for some schemas Iam able to validate the XML/XSD using XmlValidatingReader but not thro' Biztalk!

So if anyone can help me out or point the right direction, I would really appreciate it
July 2, 2004 7:37 AM
 

Badari Mysore said:

Please refer to this.

Badari
July 7, 2004 12:06 PM
 

Badari Mysore said:

July 7, 2004 12:56 PM
 

Gerhardt said:

... Drag in the assembler/dissasembler (eg. XML) and set the property “Document Schemas“ explicitly to point to the typename you want. That way we don't do a look-up and your error magically disappears....

NOT. Please help: are there any other properties that need to be set in the XML assembler/disassembler?
August 5, 2004 12:15 AM
 

Dixie's blog said:

if you get this error, you should first check Scott's Blog at: <a href="http://blogs.msdn.com/scottwoo/archive/2004/06/07/150174.aspx">http://blogs.msdn.com/scottwoo/archive/2004/06/07/150174.aspx</a><br /><br />My problem was that when I deployed my proj
October 9, 2004 3:38 PM
 

Does not find a schema specified in assembly | keyongtech said:

January 22, 2009 1:15 AM
New Comments to this post are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker