This content has been marked as final. Show 4 replies
here the doc http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/context.html#wp1106656
but I guess you are already at the stage of getting a POJO in a first Java Callout and passing the POJO to a second Java Callout, which should then return it to OSB as a XMLObject.
My recommendation is to write a Java function which returns a XMLObject and uses a XMLCursor to populate it with the values of the POJO.
An XMLObject returned to the OSB is automatically transformed in a "XML" variable (which in reality is represented as a XMLObject in the Pipeline context)
Here some code sample:
I used a java call out and got the output in the format.
"<con:java-content ref="jcid:7604bc31:12f9af31afb:-7f81" xmlns:con="http://www.bea.com/wli/sb/context"/>"
Can u help me in how to retrieve the details from this POJO. Sorry am not clear with the points specified in the documents.
You can not access content of java object in message flow. You can simply pass the object to a java callout to read it's details or directly pass it to the target destination like JMS.1 person found this helpful
this is exactly what I was trying to convey you, Prabhu: to extract the data from you Java POJO and use those data in OSB your only chance is to convert - in your Java callout - the POJO into a XMLObject. For that purpose I have passed you the link to some sample code using XMLObject and XMLCursor.1 person found this helpful
An alternative way is that in your Java Callout you manually build a String containing valid XML, and use a XMLFactory to transform it into a XMLObject
this is the API you can use: