I have this problem when trying to consume a web service wsdl:
Unknown Content-Encoding
I have tried compressing it in GZIP by sending it the charset, but at the moment of executing it, it gives me this error.
The code in php for this consumption is the following:
$usuario="user1";
$location_URL = "https://www.txstestrbm.com/GlobalPayServicios/GlobalPayServicioDePago";
$pass="abc123";
$wsdl="https://www.pagosrbm.com/GlobalPayServicios/GlobalPayServicioDePago/GlobalPayServicioDePago.wsdl";
$mode = array (
'soap_version' => 'SOAP_1_1', // use soap 1.1 client
'keep_alive' => true,
'trace' => 1,
'encoding' => utf-8,
'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE,
'Content-Encoding'=> 'UTF-8',
'exceptions' => true,
'cache_wsdl' => WSDL_CACHE_NONE,
);
$options = array(
'trace'=>true,
'location' => $location_URL,
'credenciales' => array(
'idUsuario' => $usuario,
'clave' => $pass
),
'cabeceraSolicitud' =>array(
'infoPuntoInteraccion'=> array(
'tipoTerminal'=> 'GlobalPay',
'idTerminal'=>'ESB10457',
'idAdquiriente'=>'0014591978',
'idTransaccionTerminal'=>'0101'
)
),
'infoCompra' => array(
'numeroFactura' => '',
'montoTotal' => '',
'infoImpuestos' => array(
'tipoImpuesto'=>'iva',
'monto' =>'0'
),
'montoDetallado' => array(
'tipoMontoDetallado'=>'precio',
'monto'=> '10000'
),
),
);
try {
$soap = new SoapClient($wsdl, $mode);
$data = $soap->IniciarTransaccionDeCompra($options);
} catch(Exception $e) {
die($e->getMessage());
}
var_dump($data);
die;
The page can be consulted here . I would appreciate someone if you can help me with this error.