I need to check some data with a web service and I'm doing the call like this:
$endpoint = "http://www.telefonicamovistar.com.pe/wsProxyConsultaIf/ServicioProxyConsultaInternetFija.svc?wsdl";
try {
$opts = array(
'http' => array(
'user_agent' => 'PHPSoapClient'
)
);
$context = stream_context_create($opts);
$client = new \Zend\Soap\Client($endpoint, array('stream_context' => $context,
'cache_wsdl' => WSDL_CACHE_NONE, 'soapversion' => SOAP_1_1));
$result = $client->ConsultarClienteFijo(array(
'CodigoCliente' => '1',
'CodigoCuenta' => '1',
'NumeroDocumento' => '41215621',
'Socio' => 'SI',
'Telefono' => '2614750',
'TipoDocumento' => 'DNI',
'TipoValidacion' => 'D'
));
var_dump($result);
exit();
} catch (Exception $e) {
echo $e->getMessage();
}
With that code I always get 'An unexpected error occurred in the service.' which doesn't give me enough clues to move on.
There's no problem when testing the service through SOAPUI
EDIT:
The types of the web service are these:
0 => string 'struct ConsultaClienteRequest {
string CodigoCliente;
string CodigoCuenta;
string NumeroDocumento;
string Socio;
string Telefono;
string TipoDocumento;
string TipoValidacion;
}' (length=183)
3 => string 'struct ConsultarClienteFijo {
ConsultaClienteRequest request;
}