Connecting Binding Components With the CASA Editor


Contributed by Vince Genovese
Maintained by Irina Filippova

December 2007
This publication is applicable to NetBeans IDE 6.0.


This tutorial shows how to use the Composite Application Service Assembly (CASA) Editor to create connections between Binding Component endpoints.

Expected duration: 30 minutes

Contents

  Content on this page applies to the NetBeans 6.0 IDE

Tutorial Requirements


Before you proceed, review the requirements in this section.

Prerequisites

This tutorial assumes that you have basic knowledge of the following technologies:

This tutorial assumes that you have completed the Quick Start Guide to the CASA Editor tutorial, which illustrates the basic functionality of the CASA Editor.

Software Needed for This Tutorial

Before you begin, you need to install the following software on your computer: NetBeans IDE 6.0 with SOA and the GlassFish application server.

top

Overview


This tutorial shows how to use the CASA Editor to modify the configuration of a composite application to provide a connection between two WSDL bindings.

A key feature of composite applications is the ability to decouple a service consumer from the service provider. For simple use cases, this decoupling can be implemented using the BC-to-BC connection feature of the CASA Editor. These simple use cases do not require the processing logic provided by BPEL, XSLT, or JAVA. For example, if you want to route service requests received from an external endpoint address to a service located on an internal network, you can connect two endpoints directly in CASA as shown in this tutorial.

The composite application you configure and build in this tutorial is the Synchronous Sample composite application provided with the NetBeans IDE 6.0 distribution. The tutorial illustrates the following:

Note the following:

top

Connecting WSDL Binding Endpoints

This section illustrates how to connect WSDL Binding endpoints in the Synchronous Sample application.

To create and build the Synchronous Sample Application project, which is provided with NetBeans 6.0:

  1. In the NetBeans IDE, select the Projects tab to display the Projects window.
  2. From the File menu, select New Project.
  3. In the Categories list of the New Project window, select  Samples > SOA > Synchronous BPEL Process and click Next.
  4. For the Project Name, specify SynchronousSample-BC-BC
  5. Accept the default location or specify an alternate location using the Browse button.
  6. Click Finish to create the project.
    The following projects appear in the Projects window:

    SynchronousSample-BC-BC, the BPEL project
    SynchronousSample-BC-BCApplication, the composite application project

    Synchronous Sample Projects
  7. Right-click the SynchronousSample-BC-BCApplication in the Projects window and select  Edit Application Configuration.
    The CASA editor opens in the NetBeans IDE, displaying the Design View of the Synchronous Sample application.
  8. In the CASA Editor, select the Build Project icon to build the composite application.

    CASA Editor, Building an Application

    When the build successfully completes, the Design View displays a WSDL port endpoint, a JBI module, and the connection between the endpoint and the JBI module.

top

To create a new WSDL port and connect it to an existing port:

  1. In the Palette Window, select the soap WSDL binding and drag it to the WSDL Ports area.
  2. Select the casaPort1 Consume Endpoint and drag it to the port1 Provide Endpoint.

    CASA Editor, BC-BC Connection

  3. Click the Edit icon for the casaPort1 SOAP Binding and edit the location property by specifying the following SOAP address:
    http://localhost:18183/service
  4. Click OK, then click Close.
  5. Select the Save All icon to save your changes.

 

Run a Test Case for the Composite Application

To create a test case:

  1. In the projects window expand the SynchronousSample-BC-BCApplication, right-click Test and choose New Test Case.
  2. Specify BC-BC-Test for the name of the test case and click Next.
  3. Expand the SynchronousSample-BC-BC node, select SynchronousSample-bc-bcApplication.wsdl file, and click Next.

    The composite application WSDL file contains the WSDL bindings configured by the CASA editor.
  4. Under casaBinding1, select operation1 and click Finish.
    The input.xml file displays.
  5. In input.xml, replace ?string? with Hello BC-BC and save the file.

To deploy and test the composite application:

  1. In the Projects Window, right-click the SynchronoussampleBC-BCApplication node, and select Deploy.

    If you have not yet specified an application server, select GlassFish V2.

    The application server must be running before the composite application is deployed. If the application starter has not been previously started, wait for the application server to automatically start.

    After the application server starts, the composite application is deployed.

    The Output window informs you when the composite application has been successfully deployed.
  2. In the Services window of the NetBeans IDE, expand the servers > GlassFish V2 > JBI > Service Assemblies node.

    Notice that the SynchronousSample-BC-BCApplication Service Assembly has been deployed.

    You might have to first right-click the Service Assemblies nodes and select Refresh to view the Service Assembly.

To run the test case:

  1. In the Projects window, right-click the BC-BC-Test test case and select Run.

    Because this is the first time the test case is run, the output is an empty test case. In the Overwrite Empty Output dialog, select Yes.

    Empty Test Case
  2. Under the BC-BC-Test node, double-click Output to open the Output.xml file from the test case.
  3. In the Output.xml file, within the SOAP Envelope Body, notice the string Hello BC-BC.

top

See Also


Send Us Your Feedback