Wednesday 9 November 2011

Lesson01-HelloWorld Archives

We are going to learn how to create our first “Hello World” process in Oracle SOA 11g today. It presumes Oracle SOA 11g is installed and started. Also, JDeveloper should have composite editor plugin installed.

Open JDeveloper 11g (11.1.1.3.0). If not already downloaded, you can get it from http://www.oracle.com/technology/software/products/jdev/htdocs/soft11.html Create a new Generic Application and name it SOATrainingSamples.
image
image
Click Next. In the next screen, specify New Project Name as HelloWorld. From available technologies, select SOA. This will import SOA relevant libraries into our project.

From next screen, select Composite with option. There are other composite options available, which we’ll explore in other samples.

image
Click Finish. This will prompt a “Create BPEL Process” screen. Name BPEL process as HelloWorldProcess. Select “Synchronous BPEL Service” template. Click OK.

image
JDeveloper creates HelloWorldProcess BPEL components and displays corresponding BPEL process.

image
From list of activities on the right hand navigation pane, lets drag “Assign” activity and drop between “receiveInput” and “replyOutput” activities.

image
Double click on “Assign_1″ activity and open it. Select “Copy Operation” from this screen.

image
Copy following expression into Expression Field. concat(‘Hello ‘, bpws:getVariableData(‘inputVariable’,'payload’,'/client:process/client:input’))

This can also be created from XPath Expression Builder. Assign this expression to “outputVariable” as shown above and click OK.

image
Compile BPEL process by clicking on “Make HelloWorld.jpr” link as shown below:

image
Ensure BPEL process is successfully compiled. To deploy to Weblogic server, right click on “HelloWorld” from left side navigation and select Deploy -> HelloWorld. Following images show sequence of steps to deploy BPEL executable.

image

image
image
Connection to SOA Server needs to be created beforehand. In this example, a connection named SOAServerConnection was already created.
image
image

A successful deployment message is displayed at the bottom of JDeveloper window.

image
Next, let us check the deployed process through Weblogic’s EM console. Open http://localhost:7001/em. Drill down to “default” domain from SOA node on the left side navigation bar.

image
Select “HelloWorld [1.0]” process and click on “Test” service.
image
Under “Input Arguments” section, we can see “input” as one of the fields of payload. Enter “World” in input field and click on “Test Web Service”.image

Input payload can also be seen in XML format by selecting “XML View”.
image
Response will have “Hello” prefixed to our input string “World”.
image
This completes our Hello World process.

No comments:

Post a Comment

xslt padding with characters call template for left pad and right pad

  Could a call-template be written that took two parameters ?   a string, and a   number) return the string with empty spaces appended t...