Home > OSB, SOA > OSB11G_SayHello Sample ( WSDL Based )

OSB11G_SayHello Sample ( WSDL Based )

This is to show how to create a simple OSB WSDL based service.

1. Created OSB Configuration Project “OSBConfigurationProject” and create OSB project as OSB11G_SayHello

OSBProjectCreation

OSBProjectCreation

2. Placed “SayHello.wsdl” inside the folder created with name “wsdl”.
WSDL URL: http://localhost:7001/SayHello/SayHello?WSDL

3. Created Proxy Service with the name PS_SayHello.proxy as shown

OSBProxyService

OSBProxyService

ProxyService

ProxyService

4. Open the proxy service .
4.1.On General Tab , Select “WSDL Web Service” in “Service Type”, Select “SayHello.wsdl”‘s port or binding as shown.

ProxyServiceWSDL

ProxyServiceWSDL

ProxyServiceGenaralTab

ProxyServiceGenaralTab

4.2. Go to “Transport” tab, Based on the service you are going to expose , select the “protocol”
Then based on preference change the “Endpoint URI” or leave it as it is.

ProxyServiceTransport

ProxyServiceTransport

4.3. Go to “Message Flow” tab. Right Click on “PS_SayHello” The select “Insert Into” -> “Pipiline Pair”

PSMessageFlow

PSMessageFlow

4.3 It will look like as shown below. For any activity , the “Properties” tab will appear to provide and update information about the activities.

Pipeline

Pipeline

4.4. Now use OSB activities to achieve requirement
In this we are going to pass aguments received from consumer to Business service to get the work done.
Now this SayHello service will accept string , then “Hello” will be appended before the String passed. Else “Hello” there will be replied.

5.1. Add a “Stage” on right click of “Request Pipeline” , Then select stage to rename with any name.

5.2. Added “Log” activities to log the input received in logs.

Select Log activity and selected the body variable in “Expression” field to verify what is coming as part of request.

Enter some identification String to check it from log.
Example: “************* ST_SayHello_Request *****************”
Select “Severity” for level of logging as shown

LogActivity

LogActivity

5.3. Added a assign activity just to get the name coming in request and assigning it on “requestName” variable.
Then logging that “requestName” variable just to verify from the log.

Assign1

Assign1



6. Now the request body is going to be passed to Business Service “BS_SayHello”.
Right Click Pipeline Pair “PL_SayHelloService” to add “Route” node to pass the request body to Business Service.
Right Click “RN_SayHello” to add “Routing” node to pass the request and get the response back in body variable.



6.1. Select “OSB11g_SayHello” project to create “BS_SayHello” business Service.
Then Select “SayHello.wsdl” which is going to act as external business Service.

BusinessService

BusinessService



6.2. Right Click “Routing” node to add “BS_SayHello” business servie for connecting Proxy and Business service.

ConnectBS

ConnectBS



6.3 Create a Stage in “Response Pipeline” side. Base on the requestment , the transformation of business service response will be done in this.
Here added a log activity to check the response body received from business service.

ResponsePLWithLog

ResponsePLWithLog

7.1. Create the OSB Domain, Deploy the “OSB11G_SayHello” OSB Project into server.
Select the Proxy Service and select “Run As” the “Run On Server”, the OSB Test console will open to test this service.

Enter the “name” and Click on “Execute” to trigger the test.

TestConsole

TestConsole

Advertisements
Categories: OSB, SOA Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

%d bloggers like this: