Tuesday, April 15, 2014

As we know Oracle Service Bus is stateless so we always deal with body variable inside proxy service message flow but in some case we do required custom variable.

In this post, I will show you how to create variables in Oracle Service Bus. We create custom variables in Message flow when you do variable assignment using assign or replace activity.

Click on “Variable Structures” link.



To add new variable click on “Add New Structure” link.

In OSB we can have three types of variable as shown in screen shot below.

In this post, we will create XML type variable so choose this link.



Fill values for variable label and path.

Structure Label:  It is name of the variable.
Structure Path: Variable path means how we will access this variable in Message flow.



To create XML Type variable we can choose either “Schema Element” or “WSDL Element”.

Schema Element: When you are using external schema.
WSDL Element: When you are using Inline schema means you have define your schema inside WSDL only.

Since we have external schema so we will choose “Schema Element”.


Click on Browse and choose the schema element.



Below is the variable created, now we can use this variable inside Message flow.


2 comments :

  1. Thanks Vivek.!! Your posts are really very helpful.

    ReplyDelete
  2. Vivek, I have loaded the property file xquery file and assigned it to a variable. Now I want to use that variable inside the transport header to load the values in it. but how will i cretae the outbound variable inside the transport header. i have no schema or wsdl file for that. it is just the property xquery file.
    Thanks.

    ReplyDelete