خرید بک لینک

Vote count: 0

i want to retrieve data from SOAP WSDL (PHP). But it always retu this error

SoapFault exception: [HTTP] Error Fetching http headers in /home/myTest/public_html/test/test.php:30 Stack trace: #0 [inteal function]: SoapClient->__doRequest('__soapCall('testCall', Array) #2 {main}

I already searched for the solution from google and SO, but it just didn't work for me. I followed this solution Set default_socket_timeout but nothing happened.

Here's my php code,

<?php
require_once('lib/nusoap.php');

try{
    ini_set("default_socket_timeout", 6000);

    $client=new SoapClient('https://www.example.com/wsdlexample/index.php?wsdl', 
    array("trace" => true,
    'coection_timeout' => 500000,
    'cache_wsdl' => WSDL_CACHE_BOTH,
    'keep_alive' => false));

    $params = array(
       "testParam1" => "abcd",
      "testParam2" => "efg"
    );


    $result=$client->__soapCall('testCall',array($params));

}catch (Exception $e){
    printf ( "Message = %sn", $e->__toString () );
}
?>

Please let me know if you need more further information to solve this

Thanks in advance.

asked 1 min ago

- - , .

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 2 اسفند 1394 ساعت: 9:33

صفحه بندی