0

I trying to call a web service using SOAP protocol with PHP, but it doesn't work.

The url on documentation is:

URL: http://api.teleport.com.br/wsdl/Teleport

My code:

ini_set('soap.wsdl_cache_enabled',0); 
ini_set('soap.wsdl_cache_ttl',0);

$url = "http://api.teleport.com.br/wsdl/Teleport";
try { 

    $client = new SoapClient($url);
    $function = 'ConsultaVeiculos';
    $arguments= array('ConsultaVeiculos' => array(
        "senha"  => "*************"
    ));

    $options = array('location' => $url);
    $result = $client->__soapCall($function, $arguments);

    print_r($result);


} catch (Exception $e) {
   print $result." = ".$e;
} 

The error:

= SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't find in 'http://api.teleport.com.br/wsdl/Teleport' in PATH: SoapClient->SoapClient('http://api.tele...') #1 [internal function]: FUNCION->testSOAPService() #2 PATH/CodeIgniter.php(359): call_user_func_array(Array, Array) #3 PATH(219): require_once(PATH) #4 {main}

How to correctly do this?

Thanks

Guilherme
  • 21
  • 4
  • The webpage responses with `PROTEGIDO TEX TECNOLOGIA. Tentativa de acesso por AAA.BBB.CCC.DDD` It seems it is IP protected. Are you authorized to use it? – Shutterfly Mar 12 '17 at 22:48
  • Yes. In documentation its not telling is IP protection, just have to send a parameter "senha" for the function "ConsultaVeiculos". Senha is the token to access. But if i not send senha, the error is the same. – Guilherme Mar 12 '17 at 23:08

0 Answers0