Prerequisite: Oracle SOA Composite Extension should be installed in your JDeveloper.
Create new SOA Application by going to File > New Application. Select the SOA Application from the Items list.
Provide the application name and package prefix and then click next.
Provide the project name and click next.
Select Empty Composite and then click Finish.
Now we can see, SOA Application got created.
Select the BPEL Process from the Service Components palette and drop the same into the Components area which is in the center of the work-area. A dialog will appear which will need some inputs. Provide the same as shown in the snapshot below.
The BPEL process will be added and the composite will look like the snapshot shown below.
On double clicking the BPEL process the following screen is displayed. "receiveInput" is a receive activity and is used to receive the input from the client and store it in an input variable. "replyOutput" is an invoke activity that will return the output back to the client through sayhelloworldbpelprocess partner link.
Now from component palette drag and drop one assign activity between receive and invoke activity. This activity provides a method for data manipulation, such as copying the contents of one variable to another. Copy operations enable you to transfer information between variables, expressions, endpoints, and other elements.
Double click on the Assign1 component and drill down to the outputVariable/payload/processResponse/result in right hand side.
Click on the result and select ‘Expression’ from the popup menu. Type the below mentioned code in the Expression window.
concat("Hello", bpws:getVariableData('inputVariable','payload','/client:process/client:input')
Click on Apply and OK and then click on the File > Save All menu option. This will save all the changed files.
Once the files are saved now you can deploy the SCA composite.
Deploy using a SAR file i.e. a SOA Archive (SAR). The archive file extension is JAR. The below snapshots show the SAR file creation process.
On clicking the Finish button the SCA Application is compiled and then the artifacts are packaged into a jar file. If there are any errors the same are displayed in the Messages log. If there are no errors then the SCA archive can be found at location ${WORKSPACE_DIR}/${PROJECT_NAME}/deploy.
Once the SAR file is ready we can now proceed with deploying the SCA Application in the SOA Server.
Login to Enterprise Manager(http://<HOST_NAME>:7001/em).
Expand Weblogic farm base domain from Enterprise Manager. (Farm_base_domain -> SOA -> soa-infra)
Select and right click on “soa-infra" and then select SOA Deployment -> Deploy
On the “Select Archive” page, choose “Archive is on the machine where this web browser is running” option, browse the composite to upload and then click “Next”.
Select "default" and then click "Next".
Click on "Deploy" button.
Composite has been successfully deployed.
The SCA application when successfully deployed can be tested using EM console.
Click on the Test button as shown in the snapshot.
The test webservice window opens as can be seen in the snapshot below. Since my SCA application needs only one input of type string the same can be seen as a textbox in the snapshot below in the payload section.
Now we can see output in Response tab.
Happy Learning!!!
It is very good blog and useful for students and developer , Thanks for sharing
ReplyDeleteThanks for sharing this amazing blog
Oracle SOA Online Training
Thank you.
ReplyDelete