why my xmlquery of a soap response is not working ?
pathlord Feb 7, 2019 8:52 PMhi !
I am trying to query the response from a webService.
i got an exemple on this site to xmlquery a soap response.
I am trying ot do the same whit my own soap and i am unable to get the answer.
This Exemple is fonctionnal :
select XMLCast( XMLQuery( 'declare namespace soap = "http://schemas.xmlsoap.org/soap/envelope/"; (::) declare namespace ns2 = "http://invoice.carvajal.com/invoiceService/"; (::) /soap:Envelope/soap:Body/ns2:UploadResponse/transactionId' PASSING XMLTYPE( '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:UploadResponse xmlns:ns2="http://invoice.carvajal.com/invoiceService/"> <status>Archivo recibido con exito.</status> <transactionId>TOTO</transactionId> </ns2:UploadResponse> </soap:Body> </soap:Envelope> ') RETURNING CONTENT) as varchar2(128)) AS result from dual;
My select is not fonctionnal and i dont know why ?
select XMLCast( XMLQuery( 'declare namespace s = "http://schemas.xmlsoap.org/soap/envelope/"; (::) declare namespace b = "http://tempuri.org/"; (::) declare namespace a = "http://schemas.datacontract.org/2004/07/SP.RAO.RMSNumber"; (::) declare namespace i = "http://www.w3.org/2001/XMLSchema-instance"; (::) /s:Envelope/s:Body/b:ObtenirNumeroEvenementResponse/a:ObtenirNumeroEvenementResult/a:NumeroEvenement' PASSING XMLTYPE( '<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <ObtenirNumeroEvenementResponse xmlns="http://tempuri.org/"> <ObtenirNumeroEvenementResult xmlns:a="http://schemas.datacontract.org/2004/07/SP.RAO.RMSNumber" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <a:IdentifiantDemande>?</a:IdentifiantDemande> <a:NumeroEvenement>TATA</a:NumeroEvenement> </ObtenirNumeroEvenementResult> </ObtenirNumeroEvenementResponse> </s:Body> </s:Envelope> ') RETURNING CONTENT ) AS VARCHAR2(20)) AS NumeroEvenement from dual;