Search code examples
phpcakephpcurlnusoap

HTTP Error: cURL ERROR: 35: Unknown SSL protocol error in connection nusoap in cakephp


I am try to fetch from soap webservice which's url is like https://something.com/webservice.asmx I tried by setting value of CURLOPT_SSLVERSION to 3 and CURLOPT_SSL_VERIFYPEER => FALSE but it didn't worked.

Php version : 5.5.12
Apache : 2.4.9 using wamp server 2
I tried to access https://api.authorize.net/soap/v1/Service.asmx and my code is working for this webservice but not for another webservice my code looks like this
$client = new nusoap_client($wsdl); $client->soap_defencoding = 'utf-8'; $mysoapmsg ='somexml'; $response = $client->send($mysoapmsg, $soapaction);


Solution

  • You need to put in the details about the other web service; this is very vague. A normal web service call should look like this:

    $client = new SoapClient("http://domain.com/wservices.asmx?wsdl", array('login'          => "USERNAME",
                                                                            'password'       => "PASSWORD"));
    $param = array("param_name" => $param_value);
    $response = $client->__call("MethodName", array("parameters" => $param));
    echo "<pre>";
    print_r($response);
    echo "</pre>";