Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/03/2014, 18:14
Serenity
 
Fecha de Ingreso: marzo-2002
Mensajes: 299
Antigüedad: 22 años, 11 meses
Puntos: 1
Leer XML devuelto WS Soap

Hola!!, estoy muy bloqueada con esto, por eso acudo a ustedes.

Tengo el XML en respuesta de un WS
Código XML:
Ver original
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  3. - <soap:Body>
  4. - <ObtenerPDFResponse xmlns="http://www.theenginesoftware.com/">
  5. - <ObtenerPDFResult>
  6.   <OperacionExitosa>true</OperacionExitosa>
  7.   <ErrorDetallado />
  8.   <PDF>JVBERi0xLjQKJeLjz9MKNCAwIG9iaiA8PC9GaWx0ZXI</PDF>
  9.   </ObtenerPDFResult>
  10.   </ObtenerPDFResponse>
  11.   </soap:Body>
  12.   </soap:Envelope>

Mi problema es que no puedo obtener el valor del nodo <PDF>..</PDF>

He intentado varias cosas y no logro obtener ese valor

Código PHP:
Ver original
  1. $result = simplexml_load_string($respuestaxml);
  2. echo $result->ObtenerPDFResponse->ObtenerPDFResult->PDF;

Código PHP:
Ver original
  1. $result = new SimpleXMLElement($respuestaxml);
  2. echo $result->ObtenerPDFResponse->ObtenerPDFResult->PDF;

Ya de desesperación, creo que me estoy desviando
Código PHP:
Ver original
  1. $respuesta = new DOMDocument;
  2. $respuesta->loadXML($respuestaxml);
  3. $xml = $respuesta->getElementsByTagName( "PDF" );
  4. echo $result->getElementsByTagName("PDF")->nodeValue;

Alguien que me pueda ayudar?, desde ya gracias por su atención.