Important guideline for Oracle SOA/OSB

Every time we do development in Oracle SOA suit, there is some basic and important guideline for that.

We can achieve task related to BPEL, OSB in many ways but there is always better or preferred way to achieve that development.  Source of this document you can find on Oracle forum. Here I am just discussing high view of Oracle forum.

  1. Variable define :

We always create new variable in OSB while we want to get any value from response payload. Every time we use Assign activity for creating new context variable, assign activity are converted to XmlBeans and then returned to native XQuery for the next XQuery input.

Preferred Way :

In XQuery intermediate variable can created using “let” statement. This help to avoid overhead of redundant context variable.

  1. Replace Action:

                 We use replace action to transfer data in one step. When we give some XQuery path in replace activity it increase one internal step of process.

Preferred Way :

If the entire content of $body is to be replaced, leave the XPath field blank and select “Replace node contents“. This is faster than pointing to the child node of $body (e.g. $body/Order) and selecting “Replace entire node”.

  1. Transformation request in XQuery/XSLT:

Whenever we want to pass request into input of XSLT/XQuery we use $body/* or particular node like $body/order.

Preferred Way :

Use $body/*[1] rather then $body/*. OSB treats “$body/*[1]” as a special XPath that can be evaluated without invoking the XQuery engine. This is faster than specifying an absolute path pointing to the child of $body.

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.

fn-bea:inlinedXML()

Read More »