Transformation of String to XML or XML to String Oracle OSB

Recently we stuck while doing transformation of String to XML using XQuery in OSB. We can any how achieve it via XQuery but here I am sharing our simplest way to do that.

Consider the scenario where you get input in String format in message flow of proxy and you want to convert it into XML format. This we can achieve using Xquery function fn-bea:inlinedXML(“String”) in Oracle OSB.


To convert XML into String you can use Xquery function fn-bea:serialize(XML) in Oracle OSB.


A working example you can find in my Github account in below url :

In this exmple we use globle weather check wsdl as input and call “GetWeather” operation. First we conver XML into string and then we convert string into XML format to call business service.

Happy learning!!!


2 thoughts on “Transformation of String to XML or XML to String Oracle OSB

  1. Hi while cosuming the xml from jms queue. I got the below body as request. The body is like CDATA .but I want the xml from that Cdata. Can you please help me regarding this issue.
    !<CDATA[?xml etc followed by elements. Now I need the elements present in that character data. Anu solution pls.


    • Anyhow your XQuery/XSLT will ignore CDATA tag. It will look for text only. If you use fn-bea:inlinedXML() function it will give you element in XML formant only. Can you post your XML and expected result in comments for more details?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s