2012-02-06 6 views
4

私はKohanaとPHPのSoapServer()クラスでSOAPリクエスト(QIWI支払いシステム)を提供しようとしています。WSDLで使用可能なバインディングサービスを見つけることができません

「SOAP-ERROR:WSDLの解析:WSDLで使用可能なバインディングサービスが見つかりませんでした」というPHPの致命的なエラーが表示されます。

私のサービングスクリプトは次のとおりです。

$s = new SoapServer(DOCROOT.'wsdls/IShopClientWS.wsdl'); 

私のWSDLファイルがhttp://mysite.url/wsdls/IShopClientWS.wsdl

にそれはコンテンツがされています:

 <?xml version="1.0" encoding="UTF-8"?> 
<wsdl:definitions name="IShopClientWSService" targetNamespace="http://client.ishop.mw.ru/" xmlns:tns="http://client.ishop.mw.ru/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> 
    <wsdl:types> 
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://client.ishop.mw.ru/" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://client.ishop.mw.ru/"> 
    <xs:element name="updateBill" type="tns:updateBill"/> 
    <xs:element name="updateBillResponse" type="tns:updateBillResponse"/> 
    <xs:complexType name="updateBill"> 
     <xs:sequence> 
      <xs:element minOccurs="0" name="login" type="xs:string"/> 
      <xs:element minOccurs="0" name="password" type="xs:string"/> 
      <xs:element minOccurs="0" name="txn" type="xs:string"/> 
      <xs:element name="status" type="xs:int"/> 
     </xs:sequence> 
    </xs:complexType> 
    <xs:complexType name="updateBillResponse"> 
     <xs:sequence> 
      <xs:element name="updateBillResult" type="xs:int"/> 
     </xs:sequence> 
    </xs:complexType> 
    <xs:element name="updateBillExt" type="tns:updateBillExt"/> 
    <xs:element name="updateBillExtResponse" type="tns:updateBillExtResponse"/> 

    <xs:complexType name="Param"> 
     <xs:sequence> 
      <xs:element name="name" nillable="false" type="xsd:string"/> 
      <xs:element name="value" nillable="false" type="xsd:string"/> 
     </xs:sequence> 
    </xs:complexType> 
    <xs:complexType name="ArrayOfParams"> 
     <xs:sequence> 
      <xs:element maxOccurs="unbounded" minOccurs="0" name="item" type="tns:Param"/> 
     </xs:sequence> 
    </xs:complexType> 

    <xs:complexType name="updateBillExt"> 
     <xs:sequence> 
      <xs:element minOccurs="0" name="login" type="xs:string"/> 
      <xs:element minOccurs="0" name="password" type="xs:string"/> 
      <xs:element minOccurs="0" name="txn" type="xs:string"/> 
      <xs:element name="status" type="xs:int"/> 
     <xs:element name="params" nillable="false" type="tns:ArrayOfParams"/> 
     </xs:sequence> 
    </xs:complexType> 
    <xs:complexType name="updateBillExtResponse"> 
     <xs:sequence> 
      <xs:element name="updateBillExtResult" type="xs:int"/> 
     </xs:sequence> 
    </xs:complexType> 
</xs:schema> 
    </wsdl:types> 
    <wsdl:message name="updateBillResponse"> 
    <wsdl:part name="parameters" element="tns:updateBillResponse"> 
    </wsdl:part> 
    </wsdl:message> 
    <wsdl:message name="updateBill"> 
    <wsdl:part name="parameters" element="tns:updateBill"> 
    </wsdl:part> 
    </wsdl:message> 
    <wsdl:message name="updateBillExtResponse"> 
    <wsdl:part name="parameters" element="tns:updateBillExtResponse"> 
    </wsdl:part> 
    </wsdl:message> 
    <wsdl:message name="updateBillExt"> 
    <wsdl:part name="parameters" element="tns:updateBillExt"> 
    </wsdl:part> 
    </wsdl:message> 
    <wsdl:portType name="IShopClientWS"> 
    <wsdl:operation name="updateBill"> 
     <wsdl:input name="updateBill" message="tns:updateBill"> 
    </wsdl:input> 
     <wsdl:output name="updateBillResponse" message="tns:updateBillResponse"> 
    </wsdl:output> 
    </wsdl:operation> 
    <wsdl:operation name="updateBillExt"> 
     <wsdl:input name="updateBillExt" message="tns:updateBillExt"> 
    </wsdl:input> 
     <wsdl:output name="updateBillExtResponse" message="tns:updateBillExtResponse"> 
    </wsdl:output> 
    </wsdl:operation> 
    </wsdl:portType> 
    <wsdl:binding name="IShopClientWSBinding" type="tns:IShopClientWS"> 
    <soap12:binding style="document" transport="http://www.w3.org/2003/05/soap/bindings/HTTP/"/> 
    <wsdl:operation name="updateBill"> 
     <soap12:operation soapAction="updateBill" style="document"></soap12:operation> 
     <wsdl:input name="updateBill"> 
     <soap12:body use="literal"/> 
     </wsdl:input> 
     <wsdl:output name="updateBillResponse"> 
     <soap12:body use="literal"/> 
     </wsdl:output> 
    </wsdl:operation> 
    <wsdl:operation name="updateBillExt"> 
     <soap12:operation soapAction="updateBillExt" style="document"/> 
     <wsdl:input name="updateBillExt"> 
     <soap12:body use="literal"/> 
     </wsdl:input> 
     <wsdl:output name="updateBillExtResponse"> 
     <soap12:body use="literal"/> 
     </wsdl:output> 
    </wsdl:operation> 
    </wsdl:binding> 
    <wsdl:service name="IShopClientWSServiceService"> 
    <wsdl:port name="IShopClientWSPort" binding="tns:IShopClientWSBinding"> 
     <soap12:address location="https://mysite.url/path_to_serving_script"></soap12:address> 
    </wsdl:port> 
    </wsdl:service> 
</wsdl:definitions> 

http://lxr.sweon.net/php/http/source/ext/soap/php_sdl.cでPHP-SOAPのソースファイルのために:

if (ctx.sdl->bindings == NULL || ctx.sdl->bindings->nNumOfElements == 0) { 
       soap_error0(E_ERROR, "Parsing WSDL: Could not find any usable binding services in WSDL."); 
} 

WSDLファイルの何が問題になっていますか?

非常に助かりましたか?

答えて

3

SOAP 1.2SOAP 1.1(PHPのデフォルト)ではありません。 1.2サービス、使用する場合 :

$s = new SoapServer(DOCROOT.'wsdls/IShopClientWS.wsdl', 
     array('soap_version' => SOAP_1_2)); 

また、輸送は"http://schemas.xmlsoap.org/soap/http"私の知る限り、ないhttp://www.w3.org/2003/05/soap/bindings/HTTP/でなければなりません。

<soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> 

正直に言うと、私は厳密には WSDL年代にあり、それだけでを作品だけという、理由を知りません。スペックを掘り下げるのに十分なマゾヒスティックなものがあれば、関連する部分に自由にリンクしてください。ここで

は1.1と1.2の仕様の間にいくつかのdifferenciesです:http://schemas.xmlsoap.org/wsdl/soap12/soap12WSDL.htm そして、これは単なるQIWI決済システムのバグであることを http://www.w3.org/2003/05/soap/bindings/HTTP/ ようには輸送だから、私の考えではありません。

+0

設定 'soap_version' => SOAP_1_2は役に立ちません。しかし、変化する輸送の助け!どうもありがとうございます! –

関連する問題