Open Jdeveloper 10g (10.1.3.3)
Create HelloWorld Application:
In JDeveloper, perform these steps to create an application called HelloWorld which will contain the HelloWorld BPEL Project:
1. In Oracle JDeveloper, select View > Application Navigator.
2. Right-click the Applications node and select New Application.
3. In the Create Application dialog, enter these values:
Application Name: enter HelloWorld.
Directory Name: Accept the default directory location.
Application Package Prefix: enter oracle.helloworld.
Application Template: select No Template [All Technologies].
Click OK.
4. In the Create Project dialog, click Cancel. You will create the projects later.
Create HelloWorld BPEL Project:
1. Right click on HelloWorld Application and select New Project.
2. In the New Gallery Window select BPEL Process Project.
3. In the BPEL Project Creation wizard – Project settings window enter following values:
Name: HelloWorld
Name Space: Accept Default i.e http://xmlns.oracle.com/HelloWorld
Template: Synchronous BPEL Project.
Click Next button
4. Accept default values in the screen and click finish.
5. Following HelloWorld.bpel file will be opened in Jdeveloper
Now Drop Assign Activity between ReceiveInput & ReplyOutput activities.
Double click on Assign Activity and do following:
1. On copy operation tab click on create then select copy operation.
2. on create copy operation window
On from side -> select Expression -> click on Xpath expression builder
Enter following expression then click OK.
concat('Hello World',bpws:getVariableData('inputVariable','payload','/client:HelloWorldProcessRequest/client:input'))
3. On create copy operation window map from expression to output variable like following and click ok.
4. Then click OK on Assign window.
Now right click on Helloworld BPEL project and deploy to Integration server.
You can test deployed Helloworld project from BPEL console.
The following actions take place:
1. The receiveInput receive activity receives input from the user (client), as defined in the Helloworld.wsdl file.
2. A assign activity concatenate ‘Hello World’ to input and copy into a replyOutput activity so that it can be accepted by the client application.
3. The replyOutput activity sends the repackaged response back to the client.
The following BPEL code performs the HelloWorld process:
<sequence name="main">
<receive name="receiveInput" partnerLink="client"
portType="client:HelloWorld" operation="process"
variable="inputVariable" createInstance="yes"/>
<assign name="Assign_1">
<copy>
<from expression="concat('Hello World',bpws:getVariableData('inputVariable','payload','/client:HelloWorldProcessRequest/client:input'))"/>
<to variable="outputVariable" part="payload"
query="/client:HelloWorldProcessResponse/client:result"/>
</copy>
</assign>
<reply name="replyOutput" partnerLink="client" portType="client:HelloWorld"
operation="process" variable="outputVariable"/>
</sequence>
Thanks for going through the blog.Please post me if you got any queries on this topic.
No comments:
Post a Comment