SOAP service changes from https to http

0

Hi, I am consuming a WS that the url is: https: // myqs.com?wsdl

with the following code:

$servicio="https://myapp.com/ws.svc?wsdl";
$opt = array('encoding' => 'UTF-8');
$parametros=array(
    'c' => 'a',
    'd' => 'b',
    'e' => 'c'
);

$client = new SoapClient($servicio,$opt);

$result = $client->autentifica($parametros);

 var_dump($result);

Now when I open in the browser, it shows me an error

fatal error: Uncaught SoapFault exception: [HTTP] Forbidden in C:\xampp\htdocs\ws\index.php:50 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://myapp...', 'http://tempuri....', 1, 0) #1 C:\xampp\htdocs\ws\index.php(50): SoapClient->__call('autentifi...', Array) #2 {main} thrown in C:\xampp\htdocs\ws\index.php on line 50

The error is telling me there is an error in link and when it's link . .. the url of the service why would that happen? where ?, why the service is fine, I have tested with SOAP UI.

I'm using PHP 7.2

    
asked by frijjolitto 03.04.2018 в 21:32
source

0 answers