1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| $xml = '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:recherchePointChronopostResponse xmlns:ns1="http://cxf.rechercheBt.soap.chronopost.fr/">
<return>
<errorCode>0</errorCode>
<errorMessage>Code retour OK</errorMessage>
<listePointRelais>
<accesPersonneMobiliteReduite>true</accesPersonneMobiliteReduite>
<actif>true</actif>
<adresse1>4 RUE DE MONTESSUY</adresse1>
<adresse2/>
<adresse3/>
<codePays>FR</codePays>
<codePostal>75007</codePostal>
<coordGeolocalisationLatitude>48.8597222222</coordGeolocalisationLatitude>
<coordGeolocalisationLongitude>2.304166666670</coordGeolocalisationLongitude>
<distanceEnMetre>852</distanceEnMetre>
<identifiant>2102R</identifiant>
<indiceDeLocalisation/>
<listeHoraireOuverture>
<horairesAsString>08:00-12:00 12:00-20:00</horairesAsString>
<jour>7</jour>
<listeHoraireOuverture>
<debut>08:00</debut>
<fin>12:00</fin>
</listeHoraireOuverture>
<listeHoraireOuverture>
<debut>12:00</debut>
<fin>20:00</fin>
</listeHoraireOuverture>
</listeHoraireOuverture>
</listePointRelais>
<qualiteReponse>2</qualiteReponse>
<wsRequestId/>
</return>
</ns1:recherchePointChronopostResponse>
</soap:Body>
</soap:Envelope>';
$soap = simplexml_load_string($xml);
$soap->registerXPathNamespace('ns1', 'http://cxf.rechercheBt.soap.chronopost.fr/');
foreach ($soap->xpath('//ns1:errorMessage') as $val) {
echo $val . "<br>";
} |