Using soap-client over HTTPS in PHP

392 Views Asked by At

i have problem with using soapclient in php. I have this code

$url = 'https://example.com?wsdl';
$soap = new SoapClient($url, array('trace' => true));
print_r($soap->__getFunctions()); 
$requestHeader = array(..);
$requestObject = array(..);
$request = array(
    "Header" => $requestHeader,
    "RequestObject" => $requestObject,
);
$createResponse = $soap->ServiceList(array('Request' => $request));

Which returns this error

Uncaught SoapFault exception: [HTTP] HTTP to HTTPS communication - Please reconfigure Your client to use HTTPS secured communication on port 443 

Calling __getFuncitons is ok, it prints aviable functions, but when i call some of that functions, i get that error. I was searching for some tutorial or advice, but unsuccessfully. Do you have any advice for me ?

0

There are 0 best solutions below