代码之家  ›  专栏  ›  技术社区  ›  clarkk

SOAP-加载本地WSDL文件

  •  7
  • clarkk  · 技术社区  · 7 年前

    如何将本地WSDL文件加载到 SoapClient

    $wsdl = __DIR__.'/wsdl.wsdl';
    $this->client = new SoapClient($wsdl);
    
    $xsd = __DIR__.'/wsdl/xsd/xmldsig-core-schema.xsd';
    

    PHP致命错误:SOAP-error:解析WSDL:找不到任何可用的 在WSDL中绑定服务。

    从WSDL文件到XSD文件的相对路径: ./xsd/xmldsig-core-schema.xsd

    WSDL语言

    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" >
        <wsdl:types>
    </wsdl:definitions>
    
    1 回复  |  直到 7 年前
        1
  •  6
  •   Guillaume Boudreau    7 年前

    在WSDL文件中,

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

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