Soap The server does not recognize Header

0

I have a problem. I have to access the following service:

POST /ws/emission.asmx HTTP / 1.1 Host: xxx.xxx.xxx.123: 8070 Content-Type: text / xml; charset = utf-8 Content-Length: length SOAPAction: " link "

              string       string                       int       int       string        

and it returns me: The server did not recognize the value of the SOAPAction HTTP header: link .

The code implemented:

 $opts = array(
        'ssl' => array('ciphers'=>'RC4-SHA', 'verify_peer'=>false, 'verify_peer_name'=>false)
    );
    $params = array (
        'encoding' => 'UTF-8', 
        'verifypeer' => false, 
        'verifyhost' => false, 
        'soap_version' => 'SOAP_1_1', 
        'trace' => 1, 'exceptions' => 1, 
        'connection_timeout' => 180, 
        'stream_context' => stream_context_create($opts) ,
        'xmlns' => 'http://DCX/Emision/',
    );

    $apiauth =array('IdUsuario'=>'','Password'=>'');
    $wsdl    = "http://xxx.xxx.xxx.123:8070/ws/emision.asmx?WSDL";
    $leyenda = 'http://DCX/Emision/' ;


    $params=array(
    'Anio'=>2013,
    'IdAutoModelo'=>360685,
    'CodigoInfoAuto'=>'0360685'
    );

 $header  = new SoapHeader($leyenda, 'UserCredentials', $apiauth);


  try{
    $soap = new SoapClient($wsdl); 


    $soap->__setSoapHeaders($header);       


    $response = $soap->__soapCall('ConsultaSumaAseguradaVehiculos', array($params)); 
}

I do not understand what the problem is. I was reviewing and apparently it is well implemented. I appreciate the collaboration they can make.

    
asked by CLAUDIO DOME 20.11.2018 в 14:00
source

0 answers