Friday, January 10, 2014

Oracle Service Bus - Example for Service Callout and XQuery Transformation - Using Variable across the stages

Simple OSB example to illustrate Service Callout and XQuery Transformation.

Aim: In OSB to call an service which has two arguments, first argument is coming as a input to the OSB and second argument need to receive from an service callout


I'm attaching the OSB sample project and soup ui project with thins blog.

Please import the project and then check below points. Below explanation is concentrated on proxy rather than business service. As Business service is straight forward.

There are two steps in this sample, step 1 is making a service callout of  "GetWeatherInformation" and then route it to "GetCityWeatherByZip"

service callout:
We are constructing the payload for GetWeatherInformation method using assign statement. In assign vaiable "serviceCallOutRequestVariable" we are assigning the request payload of GetWeatherInformation

<weat:GetWeatherInformation xmlns:weat="http://ws.cdyne.com/WeatherWS/"/>

Hint:We can get the request payload of GetWeatherInformation by executing the business service of GetWeatherInformation in EM.

Routing:
After getting the required information in the variable now we need to construct the payload for the routing service.

Uisng XQuery we transform the source data to the destination formation and then insert the additional information which we received from the service callout. With the constucted payload route to the GetCityWeatherByZip


Download SOUP UI Project for OSB Sample

Download OSB Sample Project

No comments:

Post a Comment