Java Reference
In-Depth Information
Discussion
Let's now walk through creating an orchestration. Once you're familiar with the concepts, it
is not hard to create a BPEL process by hand. But because in the real world you're likely to
use an IDE of some kind to create orchestrations, and because doing so will give you some
validation and guidance as you're creating them, it's worthwhile to try out the one that ships
with NetBeans 6.1. It has robust support for BPEL constructs, is easy and intuitive to use, and
doesn't add any proprietary extensions, so your code stays as portable as possible. Let's build
your process.
NOTE
As we go through the many steps required to create, deploy, and test an orchestration, be assured that
I will reference the code that is being created under the hood as much as possible. I don't like being
tied to an IDE, and I don't expect that you do either. So I will do my best to clearly reflect the XML
snippets that are being added to the process as you create it. That way, you'll be able to navigate the
XML source easily in any IDE, and because the process will be portable (compliant with the spec),
you should be able to move it into another designer and deploy it to a different BPEL runtime.
Creating a simple partner web service
First create a simple web service ( Example 9-2 ) so that the orchestration has something to in-
voke during execution of the business process. This method will retrieve a customer's name
based on an ID. You'll build the customer data business process around this service.
Example9-2.Customer lookup service implementation, CustomerWS.java
package com.soacookbook;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
package com.soacookbook;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
/**
* This is a dumb service that returns the zip code
* for a given customer.
*/
Search WWH ::




Custom Search