PHP SOAP client accessing server on non-standard port
The service I'm trying to send requests to is accessible via a non-standard port - so not port 80. It is accessible locally via port 80. So I've tested the app locally and it works fine. But when I deploy it on the production server (not on the LAN), it fails.
Once again for clarity:
-dev server is on the LAN
-SOAP server is on the LAN
-production server is on the WAN
-SOAP server is accessible through the NAT/FW via a non-standard http port (not 80)
The soap client is created with the specified WSDL URI. For example:
$this->client = new Zend_Soap_Client('http://开发者_Python百科server.com:10080/path/service.asmx?WSDL');
But queries to not work:
$this->client->function($query);
I get an:
Internal Server Error
Exception thrown.
Is PHP broken in this regard? Is there a workaround?
I found a workaround:
$this->client = new Zend_Soap_Client('http://server.com:10080/path/service.asmx?WSDL',array('proxy_host' => 'server.com', 'proxy_port' => 10080));
I pretend there is a proxy. I specify the proxy port as the server's port. This works. However, I'd still like to know if I'm making a mistake or if this is a bug in ZF or PHP. I filed a bug report with ZF for now:
http://framework.zend.com/issues/browse/ZF-9626
精彩评论