<?php
error_reporting(E_PARSE);
include('nusoap.php');
$serverURL = 'https://servientrega.appsiscore.com/app/ws';
$serverScript = 'server_wst.php';
$metodoALlamar = 'getXML';
$cliente = new nusoap_client("$serverURL/$serverScript?wsdl", 'wsdl');
$error = $cliente->getError();
if ($error) {
echo '<pre style="color: red">' . $error . '</pre>';
echo '<p style="color:red;'>htmlspecialchars($cliente->getDebug(), ENT_QUOTES).'</p>';
die();
}
$id=string;
$result = $cliente->call(
"$metodoALlamar", // Funcion a llamar
array('id'=>$id), // Parametros pasados a la funcion
"uri:$serverURL/$serverScript", // namespace
"uri:$serverURL/$serverScript/$metodoALlamar" // SOAPAction
);
if ($cliente->fault) {
echo '<b>Error: ';
print_r($result);
echo '</b>';
} else {
$error = $cliente->getError();
if ($error) {
echo '<b style="color: red">-Error: ' . $error . '</b>';
} else {
echo base64_decode($result);
}
}
<?xml version="1.0" encoding="UTF-8"?>
-<tracking>
-<miembro>
<gestion>Ingreso Centro de Operaciones</gestion>
<fecha_gestion>2018-10-15</fecha_gestion>
<hora_gestion>08:00:17</hora_gestion>
</miembro>
-<miembro>
<gestion>Asignado a Ruta</gestion>
<fecha_gestion>2018-10-15</fecha_gestion>
<hora_gestion>08:31:03</hora_gestion>
</miembro>
-<miembro>
<gestion>En Ruta a Destinatario</gestion>
<fecha_gestion>2018-10-15</fecha_gestion>
<hora_gestion>08:34:41</hora_gestion>
</miembro>
-<miembro>
<gestion>Entrega</gestion>
<fecha_gestion>2018-10-15</fecha_gestion>
<hora_gestion>16:09:30</hora_gestion>
</miembro>
-<miembro>
<gestion>Entrega Digitalizada</gestion>
<fecha_gestion>2018-10-16</fecha_gestion>
<hora_gestion>09:24:37</hora_gestion>
</miembro>
</tracking>