如何将本地WSDL文件加载到SoapClient
中?
$wsdl = __DIR__.'/wsdl.wsdl';
$this->client = new SoapClient($wsdl);
$xsd = __DIR__.'/wsdl/xsd/xmldsig-core-schema.xsd';
PHP致命错误:SOAP错误:解析WSDL:找不到任何可用的 WSDL中的绑定服务。
从WSDL文件到XSD文件的相对路径:./xsd/xmldsig-core-schema.xsd
<?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>
答案 0 :(得分:6)
在您的WSDL文件中,
<soap:binding style="document" transport="https://schemas.xmlsoap.org/soap/https"/>
应该是
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>