似乎我的请求SOAP对象被SudsLibrary 0.8错误地解析了。鉴于我有以下复杂类型:
<complexType name="getSchoolRequest">
<sequence>
<element name="school_name" type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="school_type" type="xsd:string"/>
<element name="requestee" type="xsd:string"/>
<element maxOccurs="1" minOccurs="0" name="requestee_age" type="xsd:int"/>
</sequence>
</complexType>
<element name="getSchoolRequest" type="impl:getSchoolRequest"/>
我使用以下代码生成SOAP消息:
Check SOAP Service Functional
create soap client ${WSDL_ENDPOINT}
${mySchoolRequest}= create wsdl object getSchoolRequest
${mySchoolResponse}= call soap method getSchoolResponse ${mySchoolRequest}
因此,我将此SOAP消息作为最终创建:
<SOAP-ENV:Envelope xmlns:ns0="http://jaxws.webservices.my.srv/schemas" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns1:Body>
<ns0:getSchoolRequest>
<ns0:school_name>
<ns0:school_name/>
<ns0:requestee/>
</ns0:school_name>
<ns0:requestee/>
</ns0:getSchoolRequest>
</ns1:Body>
</SOAP-ENV:Envelope>
我希望看到的是这样的事情:
<SOAP-ENV:Envelope xmlns:ns0="http://jaxws.webservices.my.srv/schemas" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns1:Body>
<ns0:getSchoolRequest>
<ns0:school_name/>
<ns0:school_type/>
<ns0:requestee/>
<ns0:requestee_age/>
</ns0:getSchoolRequest>
</ns1:Body>
</SOAP-ENV:Envelope>
SoapUI确认我期望的版本是生成的版本。我是否错过了使用SudsLibrary来使这一代变得准确?