How to read curl/xml/wsdl

Genero my xml and use curl to call the web services. I then returns another xml but do not know how to handle it. What tools have cake for this case?

  • XML TO SEND:

$post_string = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cdr="cdr"> <soapenv:Header/> <soapenv:Body> <cdr:WSCDR001b.Execute/> </soapenv:Body> </soapenv:Envelope>';

  • CURL:

$soap_do = curl_init(); curl_setopt($soap_do, CURLOPT_URL, $url); curl_setopt($soap_do, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($soap_do, CURLOPT_TIMEOUT, 30); curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true); curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($soap_do, CURLOPT_POST, true); curl_setopt($soap_do, CURLOPT_POSTFIELDS, $post_string); curl_setopt($soap_do, CURLOPT_HTTPHEADER, array('Content-Type: text/xml; charset=utf-8', 'Content-Length: ' . strlen($post_string))); $result = curl_exec($soap_do);

  • RESULT:
    <?xml version="1.0" encoding="utf-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <WSCDR001a.ExecuteResponse xmlns="cdr"> <Tramitescompleto xmlns="cdr"> <TramitesCompleto.TramitesCompletoItem xmlns="cdr"> <CodOrganismo>BRO</CodOrganismo> <CDCeIdentif>0</CDCeIdentif> <CodTramite>682</CodTramite> <DscTramite>HIDROXIMETILFURFURAL (REACCIÓN FIECHE)</DscTramite> <RecomendTramite>* Concurrir en el horario del turno con los requisitos necesarios para el mismo yla boleta con el TICKET de pago realizado en cualquier sucursal del Banco Nación.</RecomendTramite> <CDTRSector>190</CDTRSector> <CDTRImpreBoleta>1</CDTRImpreBoleta> <CDTRImpVar>0</CDTRImpVar> <CDTRGrado>0</CDTRGrado> </TramitesCompleto.TramitesCompletoItem> <TramitesCompleto.TramitesCompletoItem xmlns="cdr"> <CodOrganismo>BRO</CodOrganismo> <CDCeIdentif>0</CDCeIdentif> <CodTramite>708</CodTramite> <DscTramite>ALMIDÓN (CUANTITATIVO-GRAVIMÉTRICO)</DscTramite> <RecomendTramite>* Concurrir en el horario del turno con los requisitos necesarios para el mismo yla boleta con el TICKET de pago realizado en cualquier sucursal del Banco Nación.</RecomendTramite> <CDTRSector>190</CDTRSector> <CDTRImpreBoleta>1</CDTRImpreBoleta> <CDTRImpVar>0</CDTRImpVar> <CDTRGrado>0</CDTRGrado> </TramitesCompleto.TramitesCompletoItem> …`