Hola a todos,
Estoy intentando enviar datos a un web service pero me devuelve el error "
Fatal error: Uncaught SoapFault exception: [soap:Server] El servidor no puede procesar la solicitud. ---> Referencia a objeto no establecida como instancia de un objeto. in C:\apache\htdocs\sotrac\prueba5.php:51 Stack trace: #0 [internal function]: SoapClient->__call('SiguemeTerceros', Array)"
El codigo que estoy usando es el siguiente:
<?php
$xmlDocument="<?xml version='1.0' encoding='utf-8'?>
<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>
<soap:Body>
<SiguemeTerceros xmlns='http://tempuri.org/'>
<autenticacion>
<Usuario>xxxxxx</Usuario>
<Clave>xxxxxx</Clave>
</autenticacion>
<array_terceros>
<tercero>
<TipoIdentificacion>CC</TipoIdentificacion>
<IdentificacionTercero>123456</IdentificacionTercero>
<PrimerNombre>JUAN</PrimerNombre>
<SegundoNombre>PABLO</SegundoNombre>
<ObservacionesTercero></ObservacionesTercero>
<PrimerApellido>VELEZ</PrimerApellido>
<SegundoApellido>VELEZ</SegundoApellido>
<ApodoPersona></ApodoPersona>
<ClaseTercero>CA</ClaseTercero>
<CategoriaTercero>1</CategoriaTercero>
</tercero>
</SiguemeTerceros>
</soap:Body>
</soap:Envelope>";
//ini_set("soap.wsdl_cache_enabled", "0");
$client = new SoapClient( "http://cargacontrol.net/sigueme/Service.asmx?WSDL",
array(
'trace' => 1,
'exceptions' => 1,
'soap_version' => SOAP_1_1,
'encoding' => 'ISO-8859-1',
'features' => SOAP_SINGLE_ELEMENT_ARRAYS
)
);
$xmlvar = new SoapVar(
'<ns1:xmlDocument>'.$xmlDocument.'</ns1:xmlDocument>',
XSD_ANYXML
);
$save_result = $client->SiguemeTerceros(array('xml' =>$xmlDocument));
Muy agradecido por toda la ayuda.