How to Create a Simple Addition BPEL project in Oracle SOA Using Synchronous BPEL Process

How to Create a Simple Addition Web Service in Oracle SOA

Here I`ll show you a step by step procedure to create a SOAP based Addition Web service in Oracle Jdeveloper.

Step 1: Create a SOA Project in Jdeveloper.

Here we can see the three columns called as swim lanes

  • Exposed Services – Used for Inbound services from where we will get request which is also called Source System
  • External References – Used for Outbound services where we use to send request to external system which is also called target system
  • Components – Used to develop integrations also called as Workspace.

C:\Users\vijay.nagulakonda\Desktop\Screenshots\Adition\1.JPG

Fig: 01

D:\Data For Transfer\Screenshots\Addition with Sync\2.JPG

Fig: 02

D:\Data For Transfer\Screenshots\Addition with Sync\3.JPG

Fig: 03

Step 2: Drag and Drop BEPL Process in to the Workspace

BEPL Process is used to implement internal functionality of the Web Service. This helps in receiving input from external web service, invoke a web service adapter, reply to the web service and performs many activities that are involved in implementing a web service.
In this project we are using Synchronous Web Service as it
sends a response back to Client after completing its operations.

D:\Data For Transfer\Screenshots\Addition with Sync\4.JPG

Fig: 04

D:\Data For Transfer\Screenshots\Addition with Sync\5.JPG

Fig: 05

Here we can see the check box Expose as a SOAP Service (checked by default). This creates a new SOAP web service in the Exposed services side (i.e., to the left of BPEL).
It also generates an XML Schema with input as “
process” and output as “processResponse

 

Fig: 06

Step 3: Now edit the XML Schema file that has been generated under Schemas folder. Here we need to edit “BPELProcess1.xsd” which is under the Schemas folder.

D:\Data For Transfer\Screenshots\Addition with Sync\6.JPG

Fig: 07

The XML Schema defines the structure of request and response objects.

Here the “Process” element defines the Input/request object that will be sent as a request (XML file) to the web service, whereas the “processResponse” element defines the Output/response object that will be the response generated by the web service (XML file).

Here we need two integer values as input for our addition service which in return generates the sum of the two integers (i.e., one output).

So we update the process element with two inputs of type integer and processResponse element with one output variable (can be String or Integer) and save it.

D:\Data For Transfer\Screenshots\Addition with Sync\7.JPG

Fig: 08

D:\Data For Transfer\Screenshots\Addition with Sync\8.JPG

Fig: 09

Step 4: Now Double click on the BEPL process for implementing Addition operation. Here you can see the SOAP web service in partner links lane linked with receive service (recieveInput) and reply service (replyOutput) in the workflow.

D:\Data For Transfer\Screenshots\Addition with Sync\9.JPG

Fig: 10

Step 5:  Drag and drop Assign activity on to the workspace next to the Receive service. To Map the received input and response output as shown below.

D:\Data For Transfer\Screenshots\Addition with Sync\10.JPG

Fig: 011

C:\Users\vijay.nagulakonda\Desktop\Screenshots\Adition\24.JPG

Fig: 012

Step 6: Implement Addition Operation in Assign Activity

  • Double Click on the Assign Activity

D:\Data For Transfer\Screenshots\Addition with Sync\11.JPG

Fig: 13

  • Expand the input in the Left side and output to the Right side

D:\Data For Transfer\Screenshots\Addition with Sync\12.JPG 

Fig: 14

  • Drag and drop the expression on the output variable (or) Right click on the output variable and click on the expression.

Fig: 15

  • Double click on the input variables to add its XPATH to the expression and use functions to perform operations (here I used add function i.e., +)

D:\Data For Transfer\Screenshots\Addition with Sync\13.JPG

Fig: 16

D:\Data For Transfer\Screenshots\Addition with Sync\14.JPG

Fig: 17

Step 7: Now deploy the project on to SOA Server.

D:\Data For Transfer\Screenshots\Addition with Sync\153.JPG

Fig: 18

Thank you.

April 3, 2017

0 responses on "How to Create a Simple Addition BPEL project in Oracle SOA Using Synchronous BPEL Process"

Leave a Reply

© 2017 SCM Teck. All rights reserved.
X