At first the errors following:
Fatal error: Uncaught SoapFault exception: [HTTP] Error Fetching http headers in /var/www/me/public_html/soap.php:62 Stack trace: #0 [internal function]: SoapClient->__doRequest('http://dgpysws....', 'urn:login', 2, 0) #1 /var/www/me/public_html/soap.php(62): SoapClient->__call('login', Array) #2 /var/www/me/public_html/soap.php(62): SoapClient->login(Object(stdClass)) #3 {main} thrown in /var/www/me/public_html/soap.php on line 62
My codes were working perfect but a few days ago getting that errors.
I tried all things on Google and SO thats:
- INI SET:
ini_set('default_socket_timeout', 100); - SOAP initialize options:
'connection_timeout' => '100' - SOAP initialize options:
'keep_alive' => false - PHP Version
5.4to5.6upgrade.
My tried codes:
$options = array(
'trace' => true,
'exceptions' => true,
'keep_alive' => false,
'connection_timeout' => 100,
'soap_version' => SOAP_1_2
);
$client = new SoapClient("http://dgpysws.epias.com.tr/dgpys/services/EVDServis.wsdl", $options);
$p1 = new stdCLass();
$p1->loginMessage = new stdCLass();
$p1->loginMessage->UserName = new stdCLass();
$p1->loginMessage->UserName->v = "USERNAME";
$p1->loginMessage->Password = new stdCLass();
$p1->loginMessage->Password->v = "PASSWORD";
$client->login($p1);
I can get all types with:
$client->__getTypes(); // works
But i cant login:
$client->login($p1); // not works
Note: WSDL url is IP protected. You cant get it.