Forum Discussion

TDESBMASTER's avatar
13 years ago

Non-MTOM Part Replaced with XOP Indlude Tag

Hi Team,

I have the following schema definition and sample XML payload. When the property child is not included in a <list> element, the property node value will be replaced with XOP Include element. The resultant XML payload will fail in schema validation for those non-MTOM parts. I am using soapUI pro 4.5.0.1. Is this a soapUI bug or schema definition issue? However, the WSDL/XSD schema are WS-I compliant. Please advise.

Sample Payload:

Properties Schema Definition:

<xs:element name="properties" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="property" minOccurs="0" maxOccurs="unbounded">
<xs:complexType mixed="true">
<xs:sequence minOccurs="0" maxOccurs="1">
<xs:element type="xs:string" name="list" maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
<xs:attribute type="xs:string" name="name" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
Content Schema Definition:
<xs:element name="contentElements" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="contentElement" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="fileName" minOccurs="1" maxOccurs="1"/>
<xs:element name="content" type="dm:imageData" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:simpleType name="imageData" xmime:expectedContentTypes="application/octet-stream">
<xs:restriction base="xs:base64Binary"/>
</xs:simpleType>


Before MTOM:
<soapenv:Body>
<ns:createDocumentRequest>
<ns:repositoryId>LSWOS1</ns:repositoryId>
<ns:documentClass>CommercialCredit</ns:documentClass>
<ns:properties>
<ns:property name="DocumentType">CommercialCredit Document</ns:property>
<ns:property name="DocumentSubType">CommercialCredit subtype</ns:property>
<ns:property name="DocumentDate">2012-03-21 18:00:00</ns:property>
<ns:property name="OriginatingID">OriginatingID</ns:property>
<ns:property name="CountryCD">CountryCD</ns:property>
<ns:property name="PartyFullNM_MV">
<ns:list>Related Name1</ns:list>
</ns:property>
<ns:property name="PartyTaxID_MV">
<ns:list>TaxID 03</ns:list>
</ns:property>
</ns:properties>
<ns:contentElements>
<ns:contentElement>
<ns:fileName>imageData.txt</ns:fileName>
<ns:content>cid:5053760560</ns:content>
</ns:contentElement>
</ns:contentElements>
</ns:createDocumentRequest>
</soapenv:Body>

AfterMT OM:

<soapenv:Header />
<soapenv:Body>
<ns:createDocumentRequest>
<ns:repositoryId>LSWOS1</ns:repositoryId>
<ns:documentClass>CommercialCredit</ns:documentClass>
<ns:properties>
<ns:property name="DocumentType">
<inc:Include href="cid:http://www.soapui.org/564226746857491"
xmlns:inc="http://www.w3.org/2004/08/xop/include"
/>
</ns:property>
<ns:property name="DocumentSubType">
<inc:Include href="cid:http://www.soapui.org/564226748614418"
xmlns:inc="http://www.w3.org/2004/08/xop/include"
/>
</ns:property>
<ns:property name="DocumentDate">
<inc:Include href="cid:http://www.soapui.org/564226750590647"
xmlns:inc="http://www.w3.org/2004/08/xop/include"
/>
</ns:property>
<ns:property name="OriginatingID">
<inc:Include href="cid:http://www.soapui.org/564226750871689"
xmlns:inc="http://www.w3.org/2004/08/xop/include"
/>
</ns:property>
<ns:property name="CountryCD">
<inc:Include href="cid:http://www.soapui.org/564226751100489"
xmlns:inc="http://www.w3.org/2004/08/xop/include"
/>
</ns:property>
<ns:property name="PartyFullNM_MV">
<ns:list>Related Name1</ns:list>
</ns:property>
<ns:property name="PartyTaxID_MV">
<ns:list>TaxID 03</ns:list>
</ns:property>
</ns:properties>
<ns:contentElements>
<ns:contentElement>
<ns:fileName>imageData.txt</ns:fileName>
<ns:content>
<inc:Include href="cid:5053760560"
xmlns:inc="http://www.w3.org/2004/08/xop/include"
/>
</ns:content>
</ns:contentElement>
</ns:contentElements>
</ns:createDocumentRequest>
</soapenv:Body>