If you are behind a proxy server you need to configure your client to send the request through proxy. With WSF/PHP you can do it in two ways.
1. Setting proxy configuration in WSClient itself
You can use the ‘proxyHost’ and ‘proxyPort’ options to provide the proxy information through WSClient.
$client = new WSClient(array("to" => "http://my.external.host/service_url", "proxyHost" => PROXY_HOST, "proxyPort" => PROXY_PORT));
2. Use the axis2.xml
Change the axis2.xml to the following. (axis2.xml is in the wsf_c directory which is by default installed inside the php extension directory unless you specified it explicitly in your php.ini ‘wsf.home’ entry)
<transportSender name="http" class="axis2_http_sender"> <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter> <parameter name="xml-declaration" insert="false"/> <!--Here is where you set the proxy host and the port--> <parameter name="PROXY" proxy_host="MY_PROXY_HOST" proxy_port="MY_PROXY_IP" locked="true"/> </transportSender>
So if you want only to use the proxy for particular clients, you can use the former approach. But if you want to use the proxy for all the clients in your system just use the later approach so you don’t need to edit each client.