本文介绍了具有自定义端口的PHP Soap客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我请求托管在端口不是80的域上的wsdl.
I request a wsdl that is hosted on a domain with a port other than 80.
http://example.com:5555/test.asmx?wsdl
但是他们没有在<port>
元素
<wsdl:port name="ECommerceServiceSoap" binding="tns:ECommerceServiceSoap">
<soap:address location="http://example.com/test.asmx" />
</wsdl:port>
所以我可以下载wsdl,但是从其中进行的所有调用都会得到404响应,因为PHP soapclient不会调用正确的url(没有端口).
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).
我有什么解决方案?
推荐答案
找到解决方案:
我将wsdl下载/复制到本地文件,添加了端口并指向soapclient.现在一切正常.
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>
这篇关于具有自定义端口的PHP Soap客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!