Connection Webservice SOAP HTTPS PHP ( Santander )

Asked

Viewed 1,118 times

0

I am trying to connect to a SOAP webservice using a php client.

The client I ride like this:

$client = new SoapClient('https://urlwebservice?wsdl);

When I call the function:

$client->__getFunctions();

I get the following return:

SOAP-ERROR: Parsing WSDL: Couldn't load from 'urlwebservice?wsdl' : failed to load external entity 'urlwebservice'

When accessing the url in the browser, I get a 403-Forbidden, but if I have an A1 certificate installed on the machine it asks if I want to use it and then opens the webservice with its xml wsdl.

This error may have to do with sending the certificate? Or is it another error? To send the certificate I did as follows:

$params = array(
    'local_cert' => 'path/to/cert.cer',
    'passphrase' => 'chave' //já passei com e sem a chave
);
$client = new SoapClient('https://urlwebservice?wsdl', $params);

I already passed other parameters I searched through the internet, but in all cases the error remains the same!

Someone’s been through it?

1 answer

0


This is an error of the server on which you are trying to connect, some authorization, security token or hash, may be specified in the manual, parameters such as

'soapopations' => array(
                'exceptions'         => true ,
                'soap_version'       => SOAP_1_1 ,
                'features'           => SOAP_SINGLE_ELEMENT_ARRAYS ,
                'cache_wsdl'         => WSDL_CACHE_NONE ,
                'connection_timeout' => 500 ,
                'trace'              => true ,
            ),

have tried?

  • Hello @Felipeduarte, after an arduous journey manage to achieve integration with the Bank, and really in this case there is the need to register the certificate at the bank (Santander in this case). But beyond this problem we had problems with the checkpoint firewall, because we were able to integrate and then stopped, because the firewall was blocking access using the machine certificate, it was necessary to register the certificate in the firewall for the connection to remain permanently. Thank you.

  • @wmengue, haha that good, unfortunately much goes unnoticed in these integrations, by the way I edited the question specifying an integration with the 'santander', so that it can help someone with the same problem in the future :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.