Неустранимая ошибка: SOAP -ERROR: Кодировка: у объекта нет свойства HEADER - PHP - PullRequest
0 голосов
/ 06 марта 2020

Я пытаюсь получить доступ к этому soap веб-сервису , особенно к этой функции "WSDoAllReceiver" в моем PHP коде, но я получаю эту ошибку:

  object(SoapFault)[8]
  protected 'message' => string 'WSDoAllReceiver: Request does not contain required Security header' (length=66)
  private 'string' (Exception) => string '' (length=0)
  protected 'code' => int 0
  protected 'file' => string 'C:\wamp64\www\gravidas.com\index.php' (length=36)
  protected 'line' => int 51
  private 'trace' (Exception) => 
    array (size=1)
      0 => 
        array (size=6)
          'file' => string 'C:\wamp64\www\gravidas.com\index.php' (length=36)
          'line' => int 51
          'function' => string '__call' (length=6)
          'class' => string 'SoapClient' (length=10)
          'type' => string '->' (length=2)
          'args' => 
            array (size=2)
              ...
  private 'previous' (Exception) => null
  public 'faultstring' => string 'WSDoAllReceiver: Request does not contain required Security header' (length=66)
  public 'faultcode' => string 'soapenv:Server.generalException' (length=31)
  public 'detail' => 
    object(stdClass)[7]
      public 'hostname' => string 'sbx-payuweb02.payulatam.com' (length=27)

Мой Код:

ini_set('soap.wsdl_cache_enabled',0);
ini_set('soap.wsdl_cache_ttl',0);


$params = array (
    'encoding' => 'UTF-8', 
    'verifypeer' => false, 
    'verifyhost' => false, 
    'soap_version' => SOAP_1_1, 
    'trace' => 1, 
    'exceptions' => 0, 
    "connection_timeout" => 180
);

$url = "https://gateway2.pagosonline.net/ws/WebServicesClientesUT?wsdl";
$soapclient = new SoapClient($url, $params);
var_dump($responde = $soapclient->leerAerolineas());

Мне нужна помощь, пожалуйста.

...