2013-12-08 65 views
0

我打算在WSDL文件中配置複雜類型,並在SOAP UI客戶端中查看該複雜類型。WSDL複雜類型請求說明

查找下面的WSDL文件。

<?xml version ='1.0' encoding ='UTF-8' ?> 
<wsdl:definitions name='Catalog' 
    targetNamespace='http://website.net/websitesmsmobile' 
    xmlns:tns='http://website.net/websitesmsmobile' 
    xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' 
    xmlns:xsd='http://www.w3.org/2001/XMLSchema' 
    xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' 
    xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/' 
    xmlns='http://schemas.xmlsoap.org/wsdl/'> 

<types> 
    <xsd:complexType name="xsd:parameter"> 
     <xsd:sequence> 
      <xsd:element name="key" type="xsd:string"/> 
      <xsd:element name="value" type="xsd:string"/> 
     </xsd:sequence> 
    </xsd:complexType> 
    <xsd:element name="xsd:parameters"> 
    <xsd:complexType> 
     <xsd:sequence> 
      <xsd:element minOccurs="0" maxOccurs="1" name="parameter" type="tns:parameter"/> 
     </xsd:sequence> 
    </xsd:complexType> 
    </xsd:element> 
</types> 

<message name='callServerRequest'> 
    <part name='methodName' type='xsd:string'/> 
    <part name='parameter' type='paramters'/> 
</message> 

<message name='callServerResponse'> 
    <part name='response' type='xsd:string'/> 
</message> 

<portType name='websitePortType'> 
    <operation name='callServer'> 
    <input message='tns:callServerRequest'/> 
    <output message='tns:callServerResponse'/> 
    </operation> 
</portType> 

<binding name='websiteBinding' type='tns:websitePortType'> 
    <soap:binding 
     style='rpc' 
    transport='http://schemas.xmlsoap.org/soap/http' 
    /> 
    <operation name='callServer'> 
    <soap:operation soapAction='urn:website-net-websitesmsmobile#callServer'/> 
    <input> 
     <soap:body 
       use='encoded' 
       namespace='urn:website-net-websitesmsmobile' 
     encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
    </input> 
    <output> 
     <soap:body 
       use='encoded' 
       namespace='urn:website-net-websitesmsmobile' 
     encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> 
    </output> 
    </operation> 
</binding> 

<service name='websiteService'> 
    <port name='websitePort' binding='websiteBinding'> 
    <soap:address location='http://localhost/smsmobile/server/smsmobile.php'/> 
    </port> 
</service> 
</wsdl:definitions> 

當我在SOAP UI中創建請求時,我看到下面的內容。

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:website-net-websitesmsmobile"> 
    <soapenv:Header/> 
    <soapenv:Body> 
     <urn:callServer soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 
     <methodName xsi:type="xsd:string">?</methodName> 
     </urn:callServer> 
    </soapenv:Body> 
</soapenv:Envelope> 

作爲字符串類型的'methodName'已成功生成。爲什麼請求中未生成複雜類型的「參數」?

WSDL文件有什麼問題?

回答

0

http://www.w3.org/TR/2001/NOTE-wsdl-20010315 (實施例5 HTTP上的SOAP請求 - 響應RPC操作的結合)

GO通過上述鏈路在實施例5你的模式定義,在不正確的結合,這就是爲什麼它沒有顯示您的請求消息正確。