WSDL UNKNOWN用于输入/输出

时间:2012-04-09 16:41:28

标签: php web-services soap wsdl

我最近开始开发SOAP Web服务,但遇到了一些我无法解决的问题。所以我构建了一个PHP客户端来测试服务。当我通过我的php脚本使用soapclient调用__getFunctions时,我收到以下

array(1) { [0]=> string(31) "UNKNOWN doOrder(UNKNOWN $order)" } 

为什么我的输入和输出数据类型未知?

WSDL:

<?xml version="1.0"?>
<definitions name="PlaceOrders"
         targetNamespace="urn:PlaceOrders"
         xmlns:tns="urn:PlaceOrders"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
         xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
         xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Orders">
  <xsd:element name="orderXML" type="xsd:base64Binary" />
  <xsd:element name="orderResponse" type="xsd:string" />
</xsd:schema>
</types>

<message name="doOrder">
<part name="order" type="tns:orderXML" />
</message>

<message name="doOrderResponse">
<part name="return" type="tns:orderResponse" />
</message>

<portType name="OrderPort">
  <operation name="doOrder">
    <input message="tns:doOrder" />
    <output message="tns:doOrderResponse" />
  </operation>
</portType>

<binding name="OrderBinding" type="tns:OrderPort">
  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="doOrder">
  <soap:operation soapAction="urn:OrderAction" />
  <input>
    <soap:body use="encoded" namespace="urn:Orders" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
  </input>
  <output>
    <soap:body use="literal" namespace="urn:Orders" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
  </output>
</operation>
</binding>

<service name="OrderService">
<port name="OrderPort" binding="tns:OrderBinding">
  <soap:address location="[MYLINK]" />
</port>
</service>

</definitions>

SOAP客户端:

ini_set('display_errors',1);
ini_set('soap.wsdl_cache_enabled', 0);                                                                                                                                                                                     
$client = new SoapClient([MYLINK]);
var_dump($client->__getFunctions());                                                                                                                                                                             

0 个答案:

没有答案