Get XML value with nodes

0

I'm trying to integrate with webservice from JadLog, however the returned XML does not identify the field I need.

The return is received like this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<valorarResponse xmlns="">
<ns1:valorarReturn xmlns:ns1="http://jadlogEdiws">
<?xml version="1.0" encoding="utf-8" ?> <string xmlns="http://www.jadlog.com.br/JadlogEdiWs/services"> <Jadlog_Valor_Frete> <versao>1.0</versao> <Retorno>24,41</Retorno> <Mensagem>Valor do Frete</Mensagem> </Jadlog_Valor_Frete> </string>
</ns1:valorarReturn>
</valorarResponse>
</soapenv:Body>
</soapenv:Envelope>

I only need the value in: <Retorno>24,41</Retorno>

PHP code

//GERA REQUISIÇÃO
$Querys= "http://jadlog.com.br:8080/JadlogEdiWs/services/ValorFreteBean?method=valorar";
$Querys              .= "&vModalidade=3";
$Querys              .= "&Password=000000";
$Querys              .= "&vSeguro=N";
$Querys              .= "&vVlDec=300,00";
$Querys              .= "&vVlColeta=0,00";
$Querys              .= "&vCepOrig=35181206";
$Querys              .= "&vCepDest=30494310";
$Querys              .= "&vPeso=15";
$Querys              .= "&vFrap=N";
$Querys              .= "&vEntrega=D";
$Querys              .= "&vCnpj=00000000000";

//RECEBE RESPOSTA
$resposta= simplexml_load_file($Querys);

$valorFrete= $resposta->Retorno;
    
asked by anonymous 28.06.2018 / 14:50

0 answers