XML Database (MOSC)

MOSC Banner

Extract value from Soap response stored as XMLTYPE in table

Hi,

I have the following XML stored in a table as XMLTYPE:

<?xml version="1.0" encoding="UTF-8"?>

<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">

 <soap:Body>

    <RequestTicketResponse xmlns="https://abc.amco.com/AutobenServices/">

   <RequestTicketResult>bb5206147ba34a759d4848a0deedd156</RequestTicketResult>

  </RequestTicketResponse>

 </soap:Body>

</soap:Envelope>

This is stored in a table but how do I get the RequestTicketResult value.

I tried this but just get a null:

SELECT t.response_xml,t.RESPONSE_XML.extract('//RequestTicketResponse/RequestTicketResult/text()').getstringval() 

FROM xml_storage_table T

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center