SOAP-ERROR:解析WSDL:缺少部分&#39; GetOrderInfoErrors&#39;在<message> </message>中

时间:2014-04-18 15:49:48

标签: php web-services soap wsdl

当我尝试创建Soap客户端实例时,我遇到了问题。

它返回以下错误消息:

SOAP-ERROR:解析WSDL:缺少部分&#39; GetOrderInfoErrors&#39;在&lt;消息&gt;

以下是代码:

$this->_api = new SoapClient('https://ship.netParcel.com/services/ShippingService?wsdl',
                         array(
                        'trace' => true,
                        'location' => 'https://ship.netParcel.com/services/ShippingService'
                        )
                   );

这是wsdl:

<?xml version="1.0" ?><wsdl:definitions name="ShippingService" targetNamespace="http://www.proxy.ws.shiplinx.meritconinc.com/" xmlns:dt="http://www.proxy.ws.shiplinx.meritconinc.com/datatypes" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:req="http://www.proxy.ws.shiplinx.meritconinc.com/ShippingRequest" xmlns:res="http://www.proxy.ws.shiplinx.meritconinc.com/ShippingResponse" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.proxy.ws.shiplinx.meritconinc.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <wsdl:types>
<xsd:schema xmlns:dt="http://www.proxy.ws.shiplinx.meritconinc.com/datatypes" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:req="http://www.proxy.ws.shiplinx.meritconinc.com/ShippingRequest" xmlns:res="http://www.proxy.ws.shiplinx.meritconinc.com/ShippingResponse" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.proxy.ws.shiplinx.meritconinc.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <xsd:import namespace="http://www.proxy.ws.shiplinx.meritconinc.com/datatypes" schemaLocation="https://ship.netparcel.com/services/ShippingService?xsd=datatypes.xsd"></xsd:import>
            <xsd:import namespace="http://www.proxy.ws.shiplinx.meritconinc.com/ShippingRequest" schemaLocation="https://ship.netparcel.com/services/ShippingService?xsd=ShippingRequest.xsd"></xsd:import>
            <xsd:import namespace="http://www.proxy.ws.shiplinx.meritconinc.com/ShippingResponse" schemaLocation="https://ship.netparcel.com/services/ShippingService?xsd=ShippingResponse.xsd"></xsd:import>
        </xsd:schema>
  </wsdl:types>
  <wsdl:message name="GetOrderInfoResponseMessage">
    <wsdl:part element="res:ShippingResponse" name="Body">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="ShippingException">
    <wsdl:part element="dt:ShippingErrors" name="ShippingErrors">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="ShippingShipmentMessage">
    <wsdl:part element="req:ShippingRequest" name="Body">
    </wsdl:part>
    <wsdl:part element="req:Security" name="Security">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="ShippingResponseMessage">
    <wsdl:part element="res:ShippingResponse" name="Body">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="GetOrderInfoRequestMessage">
    <wsdl:part element="dt:OrderID" name="Body">
    </wsdl:part>
    <wsdl:part element="req:Security" name="Security">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="GetOrderInfoException">
    <wsdl:part element="dt:ShippingErrors" name="ShippingErrors">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="ShippingPortType">
    <wsdl:operation name="ShipOrder">
      <wsdl:input message="tns:ShippingShipmentMessage" name="ShippingRequest">
    </wsdl:input>
      <wsdl:output message="tns:ShippingResponseMessage" name="ShippingResponse">
    </wsdl:output>
      <wsdl:fault message="tns:ShippingException" name="ShippingErrors">
    </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="GetOrderInfo">
      <wsdl:input message="tns:GetOrderInfoRequestMessage" name="GetOrderInfoRequest">
    </wsdl:input>
      <wsdl:output message="tns:GetOrderInfoResponseMessage" name="GetOrderInfoResponse">
    </wsdl:output>
      <wsdl:fault message="tns:GetOrderInfoException" name="GetOrderInfoErrors">
    </wsdl:fault>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ShippingBinding" type="tns:ShippingPortType">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"></soap:binding>
    <wsdl:operation name="ShipOrder">
      <soap:operation soapAction="http://onlinetools.meritcon.com/webservices/ShippingBinding/v1.1" style="document"></soap:operation>
      <wsdl:input name="ShippingRequest">
        <soap:body parts="Body" use="literal"></soap:body>
        <soap:header message="tns:ShippingShipmentMessage" part="Security" use="literal">
          <soap:headerfault message="tns:ShippingException" part="ShippingErrors" use="literal"></soap:headerfault>
        </soap:header>
      </wsdl:input>
      <wsdl:output name="ShippingResponse">
        <soap:body parts="Body" use="literal"></soap:body>
      </wsdl:output>
      <wsdl:fault name="ShippingErrors">
        <soap:fault name="ShippingErrors" use="literal"></soap:fault>
      </wsdl:fault>
    </wsdl:operation>
    <wsdl:operation name="GetOrderInfo">
      <soap:operation soapAction="http://onlinetools.meritcon.com/webservices/ShippingBinding/v1.1" style="document"></soap:operation>
      <wsdl:input name="GetOrderInfoRequest">
        <soap:body parts="Body" use="literal"></soap:body>
        <soap:header message="tns:GetOrderInfoRequestMessage" part="Security" use="literal">
          <soap:headerfault message="tns:GetOrderInfoException" part="GetOrderInfoErrors" use="literal"></soap:headerfault>
        </soap:header>
      </wsdl:input>
      <wsdl:output name="GetOrderInfoResponse">
        <soap:body parts="Body" use="literal"></soap:body>
      </wsdl:output>
      <wsdl:fault name="GetOrderInfoErrors">
        <soap:fault name="GetOrderInfoErrors" use="literal"></soap:fault>
      </wsdl:fault>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="ShippingService">
    <wsdl:port binding="tns:ShippingBinding" name="ShippingServiceImplPort">
      <soap:address location="https://ship.netparcel.com/services/ShippingService"></soap:address>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

有没有人知道如何修复它?

由于

0 个答案:

没有答案