Using the Sun Data Mashup Engine

Creating and Deploying a Composite Application to Complete a Data Mashup Project

Before a Data Mashup project can be opened and used in a browser, it must be added to a composite application project. You use the composite application project to assemble a deployment unit, which includes the Data Mashup project, for the Java Business Integration (JBI) server. It is only after a successful deployment of the composite application project that you can open and run your Data Mashup project as a web service in a browser.


Note –

Requires Java CAPS 6 Update 1 or Sun GlassFish ESB.


ProcedureTo Create and Deploy a Composite Application

Before You Begin

Before you can create and deploy a composite application, you must have created a Data Mashup project, set the join conditions, the NetBeans IDE must be running, and you must be connected to the virtual database. For information on how to perform these tasks, see Designing Data Mashup Projects and Configuring Data Mashup Projects Using Joins.


Note –

To move forward or backward in the procedure, click Next or Back.


  1. Create a composite application.

    1. In the NetBeans IDE tool bar select File->New Project.

    2. In the New Project window, select SOA from Categories and Composite Application from Projects, and then click Next.


      Note –

      This step creates an empty Composite Application project that may have multiple BPEL modules and Java Business Integration (JBI) modules. SOA may already be selected.


  2. Name the composite application project and set the location for it in the New Composite Application Project window, and then click Finish.

    In the example, retain the defaults: CompositeApp1 (project name) and C:\Documents and Settings\<username>\My Documents\NetBeansProjects (project location).


    Note –

    If you do not want this project to be set as a main project make sure you deselect the Set as Main Project check box.


    The following happens:

    • A Composite Application project is created under the Projects tab in the NetBeans IDE

    • The Composite Application Service Assembly (CASA) editor opens up in the NetBeans IDE

    You are now ready to add a Data Mashup application to the JBI modules of the composite application.

  3. Under the Projects tab in the NetBeans IDE, add the Data Mashup project and its JAR files to the composite application by right-clicking JBI Modules and selecting Add JBI Module.

    • Right-click the deployment JBI node, in the example, CompositeApp1, and select Add JBI Module.

    • Right-click JBI Modules and select Add JBI Module.

    Either action opens the Select Project window.

  4. In the Select Project window, highlight the Data Mashup application in the list and click Add Project JAR Files.

    In the example, demoDMProject. This builds the service engine deployment JAR file. If you do not see the Data Mashup project in the left pane of the window, navigate to the directory that contains it. The Data Mashup application, in the example, (EDM)DemoDMProject, is added to the CASA Editor canvas as a JBI module.

  5. In the CASA Editor, right-click in the WSDL Ports area and select Add WSDL Port.

    The Select WSDL Port window appears, listing all the available WSDL ports.

  6. In the Select WSDL Port window, select http and soap and then click OK.

    An HTTP port named casaPort1 and a SOAP port named casaPort2 appear in the WSDL Ports area of the canvas.


    Note –

    Data Mashup only supports the http and the soap WSDLs.


    If you want to use the procedure to test the deployment of your composite application, when creating the WSDL port you must use the soap WSDL binding and not the http WSDL binding.

  7. Build the composite application.

    Check your output in the bottom pane to ensure that the composite application built successfully.


    Note –

    If the build fails, do the following:

    1. In the Projects pane, expand the composite application project, if not already expanded, and select the *.wsdl under Process File.

    2. In the CASA Editor, select the Source tab.

    3. Scroll down until you see

      <http:address location="http://localhost:${HttpDefaultPort}/
      casaservice1/casaPort1"/>
    4. Change casaPort1 to another port number, such as casaPort6.

    5. Build the composite application again.


  8. Drag the purple HTTP and SOAP consumer endpoints in the WSDL Ports pane to the green (EDM)DemoDMProject.

  9. Build the composition application a second time.

  10. Deploy the composite application.

    In this example, you deployed CompositeApp1. You should see a message in the Output pane that tells you that the build was successful.

Next Steps

If you used the soap WSDL binding, you can test the deployment of your composite application. See Testing the Deployment of a JBI Composite Application.

See Also