Home Page › Forums › BizTalk 2004 – BizTalk 2010 › How to build this schema?
- This topic has 1 reply, 1 voice, and was last updated 8 years, 4 months ago by
community-content.
-
AuthorPosts
-
-
February 3, 2007 at 1:55 AM #17544
This is a schema required by an API and it should be exactly build like that and passed to it, we want to do this through BizTalk, so we need to define a schema exactly like this:
<?xml version='1.0'?>
<XAPI xmlns="x-schema:phoenix.xapi">
<SERVICE_INFO>
<Id></Id>
</SERVICE_INFO>
<USER_INFO>
<EmplId></EmplId>
</USER_INFO>
<INQUIRY></INQUIRY>
</XAPI>
Questions:
1. You see there is colon (:) in the namespace, when I try to define a namespace like this it gives me error, so how to include colon in the namespace name, I know it can be included with slashes prior to it, but here it is not the case.
2. How to get rid of the ns0, that Biztalk appends in the xsd, because there is no such thing in the required schema?
3. Just confirming this, as you can see their is an xml tag in the beginnning of the schema, when we define schema in the xsd editor of biztalk, it doesn't include it with the schema, but I think if the message coming in has this xml tag at top, Biztalk wont invalidate it, am i correct?
Regards,
Sajid.
-
February 3, 2007 at 4:25 PM #17549
The xmlns="x-schema:phoenix.xapi" is not really a namespace. It is more like a processing instruction back from the day when XDR schemas were still used. It is instructing the parser to validate the document against an XDR schema called process.xapi.
The schema below will validate the document, but I am not sure of the runtime behaviour, this may fail in the XmlDisassembler.
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="XAPI">
<xs:complexType>
<xs:sequence>
<xs:element name="SERVICE_INFO">
<xs:complexType>
<xs:sequence>
<xs:element name="Id" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="USER_INFO">
<xs:complexType>
<xs:sequence>
<xs:element name="EmplId" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="INQUIRY">
<xs:complexType />
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.