Anatol Bivol
Anatol Bivol

Reputation: 993

PHP Soap client with custom port

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 ?

Upvotes: 1

Views: 1558

Answers (1)

Anatol Bivol
Anatol Bivol

Reputation: 993

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>

Upvotes: 1

Related Questions