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 ]
|