I'm trying to invoke a WS over https on a remote host:remote port and I get:
Error fetching http headers
using the PHP5 SoapClient; I can get the list of functions by doing $client->__getFunctions()
but when I call $client->myFunction(...)
I always get this error.
I've googled and found that increasing default_socket_timeout
in php.ini should fix it, but it did not work.
Can anyone suggest me a solution?
EDIT: here is the code:
$wsdl="myWSDL";
$client = new SoapClient($wsdl,array('connection_timeout'=>5,'trace'=>true,'soap_version'=>SOAP_1_2));
var_dump($client->__getFunctions());
try {
$response=$client->myFunction("1","2","3");
} catch (SoapFault $fault) {
var_dump($fault);
}
}
always ends in the error.
How do I solve the problem?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…