WSDL using soapclient
Need to access a webservice using soapclient.I have the following settings.
ini_set('default_socket_timeout', 120);
$client = new SoapC开发者_如何学Client(
"http://example.com/OnlineOrderProcessingWS.asmx?WSDL",
array('proxy_host' => "proxy url",
'proxy_port' => proxy port
)
);
$param=array("varname1"=>'value1',"varname2"=>'value2');
$result = $client->CustomerOrder($param);
print_r($result);
Executing this script throwing
Fatal error: Uncaught SoapFault exception: [HTTP] Error Fetching http headers.
The most common reason for this error seems to be a timeout while waiting on the service response. You already adjust your socket_timeout to 120, but might want to try an even higher value. How long does it take for the error to be returned?
精彩评论