I am using BizTalk 2006 R2 to create a web link from a WSDL file.
Comparing the generated XSD with the WSDL, it is obvious that most of the information has been lost.
Consider the following excerpt from WSDL:
<s:element form="unqualified" minOccurs="0" maxOccurs="4" name="Applicant"> <s:complexType> <s:sequence> <s:element form="unqualified" minOccurs="1" maxOccurs="1" name="ApplicantIdentifier"> <s:simpleType> <s:restriction base="s:string" /> </s:simpleType> </s:element> <s:element form="unqualified" minOccurs="0" maxOccurs="1" name="Name"> <s:complexType> <s:sequence> <s:element form="unqualified" minOccurs="0" maxOccurs="1" name="Title"> <s:simpleType> <s:restriction base="s:string"> <s:maxLength value="10" /> </s:restriction> </s:simpleType> </s:element> <s:element form="unqualified" minOccurs="0" maxOccurs="1" name="Forename"> <s:simpleType> <s:restriction base="s:string"> <s:pattern value="[0-9A-Za-z \-]*" /> <s:maxLength value="15" /> <s:minLength value="1" /> </s:restriction> </s:simpleType> </s:element> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element>
Equivalent XSD generated by BizTalk:
<xs:element minOccurs="0" maxOccurs="unbounded" form="unqualified" name="Applicant"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" maxOccurs="1" form="unqualified" name="ApplicantIdentifier" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" form="unqualified" name="Name"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" maxOccurs="1" form="unqualified" name="Title" type="xs:string" /> <xs:element minOccurs="0" maxOccurs="1" form="unqualified" name="Forename" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element>
So, XSD lost the constraint patterns and set its own values โโfor minOccurs and maxOccurs.
I need to map from another source to XSD, and I want to catch data that does not match WSDL at this point.
Does anyone know why BizTalk did not retain the restrictions in XSD; or how can i generate lossless xsd?
wsdl xsd biztalk biztalk2006r2
NickBeaugiรฉ
source share