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

Testing a Deployed BPEL Process

Problem

You want to create and run tests against the BPEL process that you deployed using a CASA project in NetBeans.

Solution

Create a new test case and point to the process WSDL. You’ll be asked what operation you want to test, and the IDE will generate a SOAP message that will serve as input to the operation.

Discussion

Unlike unit tests, these test cases generate SOAP messages that match your WSDL, and just know how to invoke your service behind the scenes. Following are step-by-step instructions for creating a new SOAP test for your BPEL process.

Note

This recipe expects that you have created the process from Creating a BPEL Process That Invokes a Partner and deployed it as shown in Deploying a BPEL Process to OpenESB’s BPEL Service Engine. However, the general idea is the same for any deployed BPEL process.

Creating the test

Within your CustomerCASA project, right-click on the Test folder and choose New Test Case. Enter a name of “TestHomer” for the test case and click Next. Homer is the name of the customer you expect to get back given the ID you’ll supply.

You should now see the WSDL Document Selection screen, showing a selection of possible WSDL documents based on your project. Drill down to Customer Process→Source Packages and select the CustomerProcessEsb.wsdl file. This is the file that represents the client-facing BPEL process, and that’s what you want to invoke. Click Next.

The wizard will read the WSDL file and present you with a selection of ...

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