Good afternoon I'm using laravel 5.6, and I'm trying to consume a SOAP-like webservice (wsdl), but when I try to consume it, he replies:
SOAP-ERROR: Parsing WSDL: Couldn't load from
http://www.loswebservice.com.bo:5000/WebServicesConsulta/ConsultaDatosTec.jws' : Extra content at the end of the document
The webservice address works correctly with the tests performed with SOAPUI and my controller has it defined as follows:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use SoapClient;
class WebServiceController extends Controller
{
public $Login="WSCONSULTAPRUEBA";
public $Clave="WPSUKGSGWDYSF9F";
public function getConsultaDatosTec($identificador){
$wsdl='http://www.loswebservice.com.bo:5000/WebServicesConsulta/ConsultaDatosTec.jws';
ini_set('soap.wsdl_cache', '3');
$client = new SoapClient($wsdl);
$datos_genericos=array(
"login"=>$this->Login,
"clave"=>$this->Clave,
"identificador"=>$identificador,
);
$datos_genericos = json_encode($datos_genericos);
$params = array('pStrPDatosSolicitud'=> $datos_genericos);
$result = $client->__SoapCall('getConsultaDatosTecPol',array($params));
$resultado = json_decode($result->getConsultaDatosTecPolResult->Campo1);
return $resultado;
}
}
What could be the error ???