HOWTO resolve schema by an XML instance root element
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server > HOWTO resolve schema by an XML instance root element




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    HOWTO resolve schema by an XML instance root element  
Viktor


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-29-04 12:28 AM

Hi,

http://msdn.microsoft.com/library/d....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 ca
rry the "xmlns" attribute: <DocumentType1>...</DocumentType1> for example. S
o I created a schema with targetNamespace="DocumentType1" and deployed it to
 the BizTalk Server. Howeve
r, when I submit the message I get the following error:

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

So apparently BizTalk can not resolve the schema. I also tried setting targe
tNamespace to "http://DocumentType1", "http://BizTalk_Server_Project1.Docume
ntType1", "http://tempuri.org/DocumentType1" nothing worked. As soon as I ch
ange the instance to someth
ing like "ns0:<DocumentType1 xmlns:ns0="http://BizTalk_Server_Project1.Docum
entType1">...</ns0:DocumentType1>" and deploy the schema with targetNamespac
e="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 i
n a custom pipeline component to solve the issue.

Any Help on getting this to work is much appreciated,

Viktor





[ Post a follow-up to this message ]



    RE: HOWTO resolve schema by an XML instance root element  
Tatyana Yakushev [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-29-04 10:51 PM

You need to set target namespace to empty value because the XML doesn't have
 any namespace.
Root node name should be DocumentType1 because this is the name of the root 
in your XML.

Did you know that Schema Editor can generate schema for you based on the XML
 instance?
Create new or open existing project, right-click on the project in solution 
explorer, in the context menu select Add | Add Generated Items...
At the dialog select "Generate Schemas".
At the new dialog set Document Type to "Well-Formed XML", select instance do
cument and click OK.

Regards,
Tatyana

--------------------
>Thread-Topic: HOWTO resolve schema by an XML instance root element
>thread-index: AcRdQxeRC3aa49inRI+3JQncuq2ooQ==
>X-WBNR-Posting-Host: 65.110.174.162
>From: examnotes <Viktor@discussions.microsoft.com>
>Subject: HOWTO resolve schema by an XML instance root element
>Date: Mon, 28 Jun 2004 12:07:01 -0700
>Lines: 15
>Message-ID: <BFE8B6ED-27B0-4CC8-A5EE-3EABBFFCB946@microsoft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
>	charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.biztalk.server
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 127.0.0.1
>Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.server:9764
>X-Tomcat-NG: microsoft.public.biztalk.server
>
>Hi,
>
>http://msdn.microsoft.com/library/d....asp?frame=true article says:
>
>"Pipeline components that receive XML messages determine the message type by examin
ing 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: "D
ocumentType1". 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 targetNamesp
ace to "http://DocumentType1",
"http://BizTalk_Server_Project1.DocumentType1", "http://tempuri.org/Document
Type1" nothing worked. As soon as I change the instance to something like "n
s0:
<DocumentType1 xmlns:ns0="http://BizTalk_Server_Project1.DocumentType1">...<
/ns0:DocumentType1>" and deploy the schema with
targetNamespace="http://BizTalk_Server_Project1.DocumentType1" it works fine
, but this is not something I can get out of the third-party system. I do no
t like the idea of
hardwiring the schema in a custom pipeline component to solve the issue.
>
>Any Help on getting this to work is much appreciated,
>
>Viktor
>


--

This posting is provided "AS IS" with no warranties, and confers no rights. 
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note:  For the benefit of the community-at-large, all responses to this mess
age are best directed to the newsgroup/thread from which they originated.






[ Post a follow-up to this message ]



    RE: HOWTO resolve schema by an XML instance root element  
Viktor


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-29-04 10:52 PM

That worked - thank you very much! And the tool is really useful.

I do have a follow up question though...

Do promoted properties supposed to work with such schemas that do not have a
 namespace?

My schema carries a promoted attribute which I then wire up in a send port's
 filter. It works fine when both my schema and the property schema have the 
targetNamespace specified. As soon as I set namespace for my schema to empty
 and submit now stripped me
ssage - the send port isn't getting message anymore and I am observing "Coul
d not find a matching subscription for the message" error written to event l
og. Property schema seems to require a namespace - once I set it to blank it
 puts one back in.

Thanks in advance,

Viktor

"Tatyana Yakushev [MSFT]" wrote:

> You need to set target namespace to empty value because the XML doesn't ha
ve any namespace.
> Root node name should be DocumentType1 because this is the name of the roo
t in your XML.
>
> Did you know that Schema Editor can generate schema for you based on the X
ML instance?
> Create new or open existing project, right-click on the project in solutio
n explorer, in the context menu select Add | Add Generated Items...
> At the dialog select "Generate Schemas".
> At the new dialog set Document Type to "Well-Formed XML", select instance 
document and click OK.
>
> Regards,
> Tatyana
>
> -------------------- 
> a namespace defined for it, the message type is "<rootNode>". 
> created a schema with targetNamespace="DocumentType1" and deployed it to t
he BizTalk Server. However, when I submit the message I get the following er
ror: 
> schema is deployed for the same message type." 
> "http://BizTalk_Server_Project1.DocumentType1", "http://tempuri.org/Docume
ntType1" nothing worked. As soon as I change the instance to something like 
"ns0:
> <DocumentType1 xmlns:ns0="http://BizTalk_Server_Project1.DocumentType1">..
.</ns0:DocumentType1>" and deploy the schema with
> targetNamespace="http://BizTalk_Server_Project1.DocumentType1" it works fi
ne, 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. 
>
>
> --
>
> This posting is provided "AS IS" with no warranties, and confers no rights
. Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
>
> Note:  For the benefit of the community-at-large, all responses to this me
ssage are best directed to the newsgroup/thread from which they originated.
>
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:40 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register