I have a WS where I try to consume another WS in the following way:
$parametros=array($valores["subdependencia"],$valores['usuario'],$valores['origen'],$valores["cveProveedor"],$valores["numOC"],$valores["rfcProveedor"],(($valores['usuario']=='PROVEEDOR')?($valores["rfcProveedor"]):($valores['usuario'])),$valores['dependenciaLogin'],$valores['subDependenciaLogin'],"",$valores["nomPdf"],$valores["nomarch"],$valores["intTamXml"],$valores["intTamPdf"],$valores["strTipoXml"],$valores["strTipoPdf"],$valores["strContenidoXml"],$valores["strContenidoPdf"]);
$cliente=null;
$arrDatos=null;
$fault=null;
try{
$cliente= new SoapClient(URL_WS_SOAP,array('trace' => 1,'login'=>'usuario','password' => 'pass'));//Pruebas
$arrDatos = $cliente->__soapCall('guardaCFDI',$parametros);
}catch(SoapFault $fault){
$errorSoapFault= "SOAPFault: ".$fault->faultcode."-".$fault->faultstring."\n";
}
$responseHeaders = $cliente->__getLastResponseHeaders();
preg_match("/HTTP\/\d\.\d\s*\K[\d]+/", $responseHeaders,$statusHttp);
//Si hay respuesta
if($statusHttp[0] == "200" && $fault==null){
//Resto de codigo
}else{
return "Error WS_DGCPI(". $fault->faultcode ."):".$fault->faultstring;
}
I've tried it with a client I did myself, and I've tried it with SOAPUI but it always returns the following:
Error WS_DGCPI(HTTP):Error Fetching http headers
It is worth mentioning that the files I send are in base64. Does anyone have any idea how to fix this error?