Error consuming webservice wsdl with PHP

1

I'm days with this problem, I need to consume a wsdl webservice with php.

Follow my code

$cliente = new SoapClient('http://ws.tntbrasil.com.br:81/tntws/CalculoFrete?wsdl');

$funcao = 'calculaFrete';
$parametros = array(
  'calculaFrete' =>
      array(
        'cepDestino'                        => '95045080',
        'vlMercadoria'                      => '300.85',
        'psReal'                            => '30.000',
        'cdDivisaoCliente'                  => '1',
        'cepOrigem'                         => '95032620',
        'login'                             => '[email protected]',
        'nrIdentifClienteDest'              => '00010010099',
        'nrIdentifClienteRem'               => '10668759000109',
        'nrInscricaoEstadualDestinatario'   => '',
        'nrInscricaoEstadualRemetente'      => '0290501580',
        'senha'                             => '',
        'tpFrete'                           => 'C',
        'tpPessoaDestinatario'              => 'F',
        'tpPessoaRemetente'                 => 'J',
        'tpServico'                         => 'RNC',
        'tpSituacaoTributariaDestinatario'  => 'CO',
        'tpSituacaoTributariaRemetente'     => 'ME'
    )
);
$resultado = $cliente->__soapCall($funcao, $parametros);

This is returning me the error

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://ws.tntbrasil.com.br:81/tntws/CalculoFrete?wsdl' : failed to load external entity "http://ws.tntbrasil.com.br:81/tntws/CalculoFrete?wsdl" in /home/eggecom/public_html/tnt/calculaFrete.php:19 Stack trace: #0 /home/eggecom/public_html/tnt/calculaFrete.php(19): SoapClient->SoapClient('http://ws.tntbr...', Array) #1 {main} thrown in /home/eggecom/public_html/tnt/calculaFrete.php on line 19

I have already tried in many ways and I contacted the webservice provider where they did not give me the desired support but made sure the variables were right.

PHP Version 5.6

    
asked by anonymous 30.08.2018 / 18:47

0 answers