O'Reilly logo

Java SOA Cookbook by Eben Hewitt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a BPEL Process That Invokes a Partner

Problem

You want to create a complete, real-world type process that accepts input from a client, does some BPEL work, and invokes a partner web service along the way.

Solution

Even creating a “Hello World” process in BPEL is somewhat labor-intensive. The following steps create a basic orchestration that only invokes one service to return a response:

  1. If you don’t already have a web service or a set of services to invoke as part of the application, create one.

  2. Create a BPEL project in your IDE. Add the WSDL of the web service your orchestration will invoke and any schemas it uses to your project. Create a .bpel file.

  3. Build the orchestration. There are several basic activities to perform to do this. You need to create a partner link that represents the client-facing aspect of the orchestration. Then create a partner link for the services you’re going to invoke. Then start building the process a container such as a <sequence> and add activities to it. At minimum, you will need to <receive> incoming messages, <assign> the incoming message to a variable you can pass to the service you’re going to invoke, then <invoke> the service, and <assign> its response to an outbound message that can be used in a <reply> back out of the orchestration to the client.

Note

Creating such a process is a very good way to start with BPEL. It covers all of the basic functions of an orchestration, and it gives you a simple and flexible base where you can experiment with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required