2013-12-08 70 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你的模式定义,在不正确的结合,这就是为什么它没有显示您的请求消息正确。