Webservices (soap,rest,...) - el Sevidor no reconoció el encabezado HTTP SOAPAction

 
Vista:
sin imagen de perfil
Val: 1
Ha aumentado su posición en 6 puestos en Webservices (soap,rest,...) (en relación al último mes)
Gráfica de Webservices (soap,rest,...)

el Sevidor no reconoció el encabezado HTTP SOAPAction

Publicado por Claudio (1 intervención) el 20/11/2018 20:13:47
Tengo un problema. tengo que acceder a el siguiente servicio:

POST /ws/emision.asmx HTTP/1.1 Host: xxx.xxx.xxx.123:8070 Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://DCX/Emision/ConsultaSumaAseguradaVehiculos"

y me devuelve : El servidor no reconoció el valor del encabezado HTTP SOAPAction: http://DCX/Emision/ConsultaSumaAseguradaVehiculos.

El codigo implementado :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$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));
}
No entiendo cual es el problema. estuve revisando y al parecer esta bien implementado. Agradezco la colaboración que puedan hacer.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder