2
I’m trying to integrate my system with the jadlog carrier but I can’t get the xml data with php.
Upshot:
<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>114,11</Retorno>
<Mensagem>Valor do Frete</Mensagem>
</Jadlog_Valor_Frete>
</string>
</ns1:valorarReturn>
</valorarResponse>
</soapenv:Body>
I tried to get the data the following way:
$retornoJadlog= simplexml_load_string(file_get_contents($urlJadlog));
or
$retornoJadlog= simplexml_load_string($urlJadlog);
But in both ways the return is null:
object(SimpleXMLElement)#4 (0) {
}
Buddy, the above return is not null. It is returning the
SimpleXmlElement
. It is an object containing the information.– Wallace Maxters
Possible duplicate of Check XML with php
– user45474
How do I access the data? because using var_dump() the return is what I showed in the question
– Gustavo Paes