Skip to Main Content

Integration

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Access XML in java embedding in oracle SOA 11g

User_EWWE4Feb 2 2021

We are using SOA 11g. 11.1.1.7.0
I am trying to access the XML in java embedding instead of single xml element. But it is showing only values without tags when i print in logs.
I have variable "inputName" string that has the data as below
<inputName xmlns:def="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="def:string"><orderactivity><order><ordersource>EDI</ordersource><ordertype>NA SPECIAL</ordertype><ponum>151255553384-5000244</ponum><status>A</status><orderdate>01/25/21</orderdate><customernum>5000244</customernum><shiptoloc>5000244</shiptoloc><custpo>151253384</custpo><jobname>665619208 test</jobname><fob>PP</fob> </order></orderactivity>]]></inputName></inputName>

I tried to get this variable in java embedding as below
try{
XMLElement inputParam = (XMLElement)getVariableData("inputName");
String input_str = inputParam.getTextContent();
addAuditTrailEntry("Input String is " + input_stream);
}catch(Exception exc) {
addAuditTrailEntry(exc);
}

This is what it prints in logs. it is printing all the values without xml tags.
Input String is EDINA SPECIAL151253384-5000244A01/25/2150002445000244151253384665619208 test

How to access the whole xml payload in java embedding. Am looking at the desired output as below with XML tags.
<inputName xmlns:def="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="def:string"><orderactivity><order><ordersource>EDI</ordersource><ordertype>NA SPECIAL</ordertype><ponum>151255553384-5000244</ponum><status>A</status><orderdate>01/25/21</orderdate><customernum>5000244</customernum><shiptoloc>5000244</shiptoloc><custpo>151253384</custpo><jobname>665619208 test</jobname><fob>PP</fob> </order></orderactivity>]]></inputName></inputName>

Comments

Post Details

Added on Feb 2 2021
2 comments
89 views