2

Re-edited to re-frame with new information.

I am trying to access a SOAP API via PHP. The application with the API is hosted on my corporate network and the WS is exposed on port 8080.

I can access the WSDL file on http://network-machine.local:8080/service?wsdl in my browser (it loads very fast). However, the following pieces of code simply result in a fatal error of maximum execution time exceeded:

new SoapClient('http://network-machine.local:8080/service?wsdl');

file_get_contents('http://network-machine.local:8080/service?wsdl');

PHP can access other remote services (including WSDL).

If I save the wsdl file (and its imported files) to my local machine and update the references, PHP can access the API services just fine. It just can't pull in the WSDL.

So, I assume it's some kind of networking/firewall issue. Any ideas?

Edit with more info:

cURL works just fine. With cURL I can get the total size of the WSDL file. When I use that size as the MAXLENGTH parameter of file_get_contents, that function works OK too.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.