PHP Soap client with custom port

独自空忆成欢 提交于 2019-12-13 17:31:06

问题


I request a wsdl that is hosted on a domain with a port other than 80.

http://example.com:5555/test.asmx?wsdl

But they did not specify the port in the <port> element

<wsdl:port name="ECommerceServiceSoap" binding="tns:ECommerceServiceSoap">
    <soap:address location="http://example.com/test.asmx" />
</wsdl:port>

so I can download the wsdl but all the calls from it get a 404 response because the PHP soapclient doesn't call the right url (without the port).

What solutions do I have ?


回答1:


Figured a solution :

I downloaded/copied the wsdl to a local file, added the port and pointed the soapclient to it. Now it all works fine.

<wsdl:port name="ECommerceServiceSoap" binding="tns:ECommerceServiceSoap">
    <soap:address location="http://example.com:5555/test.asmx" />
</wsdl:port>


来源:https://stackoverflow.com/questions/48543484/php-soap-client-with-custom-port

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!