问题
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