Using the Sun Data Mashup Engine

Viewing the Data

Before you can open your Data Mashup virtual database as a web service in a browser, you need to ensure that the URL is set up properly.

There are two tasks you can perform prior to opening your Data Mashup virtual database in a browser.


Note –

Requires Java CAPS 6 Update 1 or Sun GlassFish ESB.


ProcedureTo Select the Columns That are Exposed in the Browser

  1. In the Projects pane, highlight the Data Mashup project you created.

    For example, DemoDMProject.

  2. In the EDM Editor, choose the Design tab.

    The ROOT JOIN, Runtime Input, and the SUPPLIER_ADDRESS and COMPANY_DATA tables appear in the EDM Editor. The columns that will be exposed in the browser are listed in the tables.

    1. To prevent a column from appearing the browser, right-click a table, such as SUPPLIER_ADDRESS.

    2. In the selection list that appears in the EDM Editor, choose Select Columns.

    3. Deselect the columns you do not want to appear in the browser.

ProcedureTo Invoke a Web Service with the HTTP Binding Component

  1. Locate and edit the URL for the Data Mashup virtual database.

    1. Under the Projects tab, expand the composite application->Process Files, and select the WSDL for the project.

      For example, demoCompositeApp and demoCompositeApp.wsdl.

    2. In the WSDL Editor, choose the Source tab to expose the code for the WSDL.

    3. Scroll down until you find the line that is similar to:

      <http:address
      location="http://localhost:${HttpDefaultPort}/casaservice1/casaPort1"/>

      You are going to edit the part of the string that is highlighted in bold. When you are done, the line will look something like: http:addresslocation="http://localhost:9080/casaservice1/casaPort1.

    4. (Optional) If the casaPort numbers are already in use, for example, casaPort1 and casaPort2, change the number of casaPort in the string to another number, for example casaPort6.

    5. Locate the port number for your localhost.

      1. In the Projects pane, expand Servers->GlassFish V2->JBI->Binding Components, and right-click sun-http-binding.

      2. In the sun-http-binding – Properties window use the default HTTP port number to replace the string, ${HttpDefaultPort}, for example 9080.

    6. Type the code that sets how you can display your virtual database in the browser.

      For example: ?page=0&row=0&column=0&. When you open your Data Mashup virtual database in the browser, replace the zeros (0) in the string to change how the information for COMPANY_DATA and SUPPLIER_ADDRESS is displayed.

    7. Add the two tables you mashed together to the URL.

      1. In the Projects pane, highlight the Data Mashup project you created.

        For example, DemoDMProject.

      2. In the EDM Editor, choose the Source tab.

      3. In the EDM Editor, scroll until you find FILE_LOC_S1_SUPPLIER_ADDRESS and FILE_LOC_S2_COMPANY_DATA.

      4. Add the runtime input, FILE_LOC_S1_SUPPLIER_ADDRESS and FILE_LOC_S2_COMPANY_DATA with =0& after the first file name and =0 after the second file to your URL.

        If you changed the CASA port number as mentioned above, the URL should now look something like:

        http://localhost:9080/casaservice1/casaPort6?page=0&row=0&column=0&
        FILE_LOC_S1_SUPPLIER_ADDRESS=0&FILE_LOC_S2_COMPANY_DATA=0

        If you did not change the CASA port number as mentioned above, the URL should now look something like:

        http://localhost:9080/casaservice1/casaPort1?page=0&row=0&column=0&
        FILE_LOC_S1_SUPPLIER_ADDRESS=0&FILE_LOC_S2_COMPANY_DATA=0

        Note –

        There are no spaces in this URL.


    You are now ready to copy the URL into your browser and view and manipulate your project, which is now functions as a web service.

  2. Open a browser and copy the URL into it.

  3. Replace the zeros in the URL string to change how the web service displays.


    Note –

    If you have any trouble viewing the data, see issue #65 in Known Data Mashup Issues.


  4. Repeat step 3 with other values.

See Also