SOAP-错误:解析 WSDL:无法在 WSDL 中找到任何可用的绑定服务

问题描述 投票:0回答:1

我在尝试访问我的 WSDL 时遇到此问题

    public function send(){

    $options = [
        'soap_version' => SOAP_1_2
    ];
    $soap = new \SoapClient('http://localhost:1025/GMService/?wsdl', $options);
    var_dump($soap->__getFunctions());

}

网页链接:

php soap wsdl
1个回答
0
投票

我猜您的 WSDL 文件中缺少

<wsdl:binding>
标签,它应该看起来像

<wsdl:binding name="SomeServiceSOAPBinding" type="tns:SomeService">

然后你还应该有

<wsdl:service>
标签和
<wsdl:port>
,以及它的一些示例

    <wsdl:service name="SomeService">
        <wsdl:port binding="tns:SomeServiceSOAPBinding" name="SomeServicePort">
            <soap:address location="http://127.0.01:1025/SomeServicePort"/>
        </wsdl:port>
    </wsdl:service>
© www.soinside.com 2019 - 2024. All rights reserved.