Forum Discussion

VanDerPlaat's avatar
13 years ago

Workaround for validating xmls with doc/lit TWO bodyparts?

Hi Guys,

I have a question about validating XML's that were made using a WSDL. I am currently working on a project on wich we use document/literal style WSDL's. I understood that the standards wont allow two bodyparts to be defined. We DO use two bodyparts in our WSDL. The Tibco systems we build dont have any problems with this.

Here's the catch. If I try to validate XML's that were made using a document/literal WSDL with TWO bodyparts SoapUI gives me this message: "line -1: DocLiteral message must contain 1 body part definition".

Is there ANY workaround known for this problem? The programmers are unwilling to change the XML's since it's no problem for them. But is IS a problem for me since I can't validate the XML's that i made for the testing.

Any help is greatly appreciated! Thanks in advance.

Marty

5 Replies

    • nmrao's avatar
      nmrao
      Champion Level 3
      Can you explain more about your issue? Also would it be possible to show the respective XSD which you think causing the issue?
      • dieterwurm's avatar
        dieterwurm
        New Contributor

        Here is the WSDL and the XSD. When I have a project in soapui with this i will get the validate error : line -1: DocLiteral message must contain 1 body part definition.

         

        XSD:

         <?xml version="1.0" encoding="windows-1252" ?>
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:mtom="http://www.aaaa.com/SOA/swatest_1_0"
        targetNamespace="http://www.aaaa.com/SOA/swatest_1_0"
        elementFormDefault="qualified">
        <xsd:element name="response">
        <xsd:annotation>
        <xsd:documentation>A sample element</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
        <xsd:complexContent>
        <xsd:extension base="mtom:responseType"/>
        </xsd:complexContent>
        </xsd:complexType>
        </xsd:element>
        <xsd:element name="request" type="mtom:requestType">
        <xsd:annotation>
        <xsd:documentation>A sample element</xsd:documentation>
        </xsd:annotation>
        </xsd:element>
        <xsd:element name="conten">
        <xsd:complexType>
        <xsd:sequence>
        <xsd:element name="conten" type="xsd:base64Binary" minOccurs="0"
        maxOccurs="1"/>
        </xsd:sequence>
        <xsd:attribute name="href" type="xsd:string"/>
        </xsd:complexType>
        </xsd:element>
        <xsd:element name="contenResponse">
        <xsd:complexType>
        <xsd:attribute name="href" type="xsd:string"/>
        </xsd:complexType>
        </xsd:element>
        <!-- <xsd:complexType name="contenType">
        <xsd:sequence>
        <xsd:element name="conten" type="xsd:base64Binary">
        </xsd:element>
        </xsd:sequence>
        </xsd:complexType>
        -->
        <xsd:complexType name="requestType">
        <xsd:sequence>
        <xsd:element name="Name" type="xsd:string"/>
        <xsd:element name="pdf" type="xsd:base64Binary" minOccurs="0"
        maxOccurs="1"></xsd:element>
        </xsd:sequence>
        </xsd:complexType>
        <xsd:complexType name="responseType">
        <xsd:sequence>
        <xsd:element name="Name" type="xsd:string">
        </xsd:element>
        <xsd:element name="pdf" type="xsd:base64Binary" minOccurs="0"
        maxOccurs="1">
        </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="href" type="xsd:string"/>
        </xsd:complexType>
        </xsd:schema>

         

         

        wsdl:

        <?xml version= '1.0' encoding= 'UTF-8' ?>
        <wsdl:definitions name="SWATest"
        targetNamespace="http://www.aaaa.com/sca/soapservice/poc/SWATest/SWATest"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        xmlns:inp1="http://www.aaaa.com/SOA/swatest_1_0"
        xmlns:tns="http://www.aaaa.com/sca/soapservice/poc/SWATest/SWATest"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">
        <wsdl:types>
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <xsd:import namespace="http://www.aaaa.com/SOA/swatest_1_0"
        schemaLocation="xsd/SWATest.xsd"/>
        </xsd:schema>
        </wsdl:types>
        <wsdl:message name="requestMessage">
        <wsdl:part name="request" element="inp1:request"/>
        <wsdl:part name="bin" element="inp1:conten"/>
        </wsdl:message>
        <wsdl:message name="replyMessage">
        <wsdl:part name="response" element="inp1:response"/>
        <wsdl:part name="binResponse" element="inp1:contenResponse"/>
        </wsdl:message>
        <wsdl:portType name="execute_ptt">
        <wsdl:operation name="execute">
        <wsdl:input message="tns:requestMessage"/>
        <wsdl:output message="tns:replyMessage"/>
        </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="execute_pttSOAP11Binding" type="tns:execute_ptt">
        <soap:binding style="document"
        transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="execute">
        <soap:operation style="document"
        soapAction="http://www.aaaa.com/sca/soapservice/poc/SWATest/SWATest/execute"/>
        <wsdl:input>
        <mime:multipart>
        <mime:part>
        <soap:body use="literal" parts="request"/>
        </mime:part>
        <mime:part>
        <mime:content type="application/octet-stream"
        part="bin"/>
        </mime:part>
        </mime:multipart>
        </wsdl:input>
        <wsdl:output>
        <mime:multipart>
        <mime:part>
        <soap:body use="literal" />
        </mime:part>
        <mime:part>
        <mime:content type="application/octet-stream"
        part="binResponse"/>
        </mime:part>
        </mime:multipart>
        </wsdl:output>
        </wsdl:operation>
        </wsdl:binding>
        </wsdl:definitions>