Entry
HAT ERROR: "The disassembler cannot retrieve the document specification by using this type: "http://www.temp.com/message/genericheader.xsd#Msg". Either the schema is not deployed correctly, or more than one schema is deployed for the same message type."
Apr 6th, 2005 22:54
Balaji Ramachandran, http://biztalk-training.com/Default.aspx?tabid=57
Answer from 8/4/2021 9:47 AM PST
microsoft.public.biztalk.general
Hello,
>I have several deployed schemas with the same namespace and rootnode
on my BizTalk Server. When I receive a XML schema I get the following
>error:
>
>"The disassembler cannot retrieve the document specification by using
this type: "http://www.temp.com/message/genericheader.xsd#Msg". Either
the
schema is not deployed correctly, or more than one schema is deployed
for the same message type."
As I am sure you know, BizTalk refers schemas by the concatenation of
their namespaces, the "#" sign and the RootNode. This string is the
identifier
of the schema as far as BizTalk is concerned, in many places. In your
example, the namespace is http://www.temp.com/message/genericheader.xsd
and the root node is Msg.
>Since my xsd's are 3rd party I cannot make the namespace / rootnode
unique.
As I am sure you understand, you will run into several other speed
bumps if you have multiple schemas with the same "id".
However, depending on what you want to do, this might be possible.
>I have found an earlier answer to this problem from Adrian Hamza[MSFT]
>"There are two ways you can deal with this:
>#1 Use a custom receive pipeline and in the disassembler specify the
schema
[....]
>My question is:
>How can I do #1 as stated above?
This relies on the fact that you have a way to disambiguate schemas
when presented with the actual flat file data. If you cannot do this,
you cannot
proceed. Here is how you would do this:
1) You want to write a custom disassembler pipeline component that
extends the out of the box flat file disassembler. For this,
read http://msdn.microsoft.com/library/en-
us/sdk/htm/ebiz_prog_pipe_eiji.asp?frame=true
2) When the data comes in (in the Disassemble() method), write code
that can sniff it and that decides which schema to use.
3) Use the BizTalk Explorer OM, and more specifically the Schemas
collection at
http://msdn.microsoft.com/library/en-
us/sdk/htm/frlrfmicrosoftbiztalkexploreromschemacollectionclasstopic.asp
?frame=true)
to get the schema you want. This is the tricky steps. BizTalk lets you
iterate through schemas by assemblies only (i.e. you must know the name
of the assembly which contains the schemas you need or you must scan
all schemas of all deployed assemblies and this will slow down your
solution a lot).
4) Remember that the flat file disassembler can only operate on schemas
that are deployed. Moreover, as I am sure you know, a flat file
disassembler
schema is a schema with annotations telling the flat file how to
perform. A schame without those annotations will not work.
5) When you have sniffed the data and figured out which schema and
found a reference to the schema, rewind the stream
(msgIn.Seek(0, SeekOrigin.Begin)) and pass the schema, the stream top
FFDasmComp to perform the disassembling.
6) You might want to promote two properties: the name of the schema as
well as the strong name of the assembly inside which the schema was
found.
[...]
>I've also tried setting the "Allow unrecognized message" property to
True but then the message isn't validated and my promoted property is
not
>available in the context of the received message.
Thanks.
-Gilles.
See also:
http://www.traceofthought.net/PermaLink,guid,cfa8a62a-af33-44b8-a40e-
ede8d1b2867c.aspx