Problem trying to connect to SOAP Web Service

0

I'm trying to connect to a web service by PHP that the documentation provided uses the SOAP protocol, but I can not even connect through the provided URL.

URL: link

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;
        } 

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}

Does anyone know how to connect to the web service? The documentation only shows this url and I have passed a password, however the password should be to enter the QueryVeiculos and gives error already in the new SoapClient ()

    
asked by anonymous 14.03.2017 / 00:39

1 answer

0

Try to instantiate the soap this way:

$client = new SoapClient(null, $url);

This way, you do not send wsdl xml.

    
19.05.2017 / 16:24