Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Extract multiple values from SOAP Respond

717341Aug 20 2009 — edited Aug 23 2009
Hello,

I'm trying to consume a custom Web Service I've written from PL/SQL and published using JDeveloper. I'm able to write a code to successfully use this Web Service if the SOAP output contains only one value.

I've updated this Web Service and now, the SOAP yields 2 output. My question is, how can I store each value to a variable?

Here's the SOAP output. I want to store the values from tags perrormsgInout and return.

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://trn2/UpdatePO.wsdl">
<env:Body>
<ns0:updatePoResponseElement>
<ns0:result>
<ns0:perrormsgInout>Successfully updated PO 0818200902</ns0:perrormsgInout>
<ns0:return>Y</ns0:return>
</ns0:result>
</ns0:updatePoResponseElement>
</env:Body>
</env:Envelope>

And here's the later part of my code. I'm only able to store the first value. How can I store into a variable the 2nd value?

l_resp:= l_resp.extract (
'ns0:updatePoResponseElement/ns0:result/ns0:perrormsgInout/text()'
,'xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://trn2/UpdatePO.wsdl"'
);

l_error_msg := l_resp.getClobVal();
DBMS_OUTPUT.put_line ('l_error_msg = ' || l_error_msg);

Thanks in advance for the help.
This post has been answered by Jason_(A_Non) on Aug 20 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 20 2009
Added on Aug 20 2009
2 comments
2,800 views