Before you can open your Data Mashup virtual database as a web service in a browser, you need to ensure that the URL is configured properly.
Perform the following steps to configure and view the mashed up data:
There are two tasks you can perform prior to opening your Data Mashup virtual database in a browser:
Choose which table columns you want to display in the browser.
Configure the Data Mashup virtual database so that it functions as desired in the browser.
In the Projects window, expand the Data Mashup project you created and double-click the EDM collaboration.
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.
Right-click a table for which you want to select or deselect columns.
Click Select Columns.
On the Select Columns dialog box, deselect any columns you do not want to appear in the browser and make sure the columns you want to display are selected.
In this step, you need to locate and edit the URL for the Data Mashup virtual database. Locate the information you need to add to the URL by performing the following steps. Make a note of the information you find as you will need to add it to the http:address URL in the WSDL file.
To locate the default HTTP port number, do the following:
In NetBeans, click the Services tab and expand Servers->GlassFish V2->JBI->Binding Components.
Right-click sun-http-binding and click Properties.
In the sun-http-binding – Properties window, note the value of the Default HTTP Port Number property (by default, 9080).
Locate the names of the runtime inputs by doing the following:
In the Projects window, expand the Data Mashup project you created, and double-click the EDM collaboration (for this exercise, demoDMfile.edm).
The file opens in the EDM Editor.
In the EDM Editor, click the Source tab.
Scroll to the first dbTable element, and look for a runtime input name attribute. Note the value of the attribute.
For this exercise, the attribute is named flatFileLocationRuntimeInputName and the value is FILE_LOC_S1_SUPPLIER_ADDRESS.
Repeat the above step for the next dbTable element.
For this exercise, the value is FILE_LOC_S2_COMPANY_DATA.
To invoke the web service:
On the Projects window, expand Process Files under the composite application, and double–click the WSDL file for the project.
The file appears in the WSDL editor.
In the WSDL Editor, expand Services and expand casaService1 and casaService2.
(Optional) If the casaPort numbers are already in use, for example, casaPort1 and casaPort2, do the following:
Under the first casaPort node, select http:address.
The value of the Location property is similar to http://localhost:${HttpDefaultPort}/casaservice1/casaPort1.
Modify the Location property URL by changing ${HttpDefaultPort} to the default HTTP port number you located earlier.
When you are done, the entry will look similar to: http://localhost:9080/casaservice1/casaPort1.
Append code to the URL that sets how you can display your virtual database in the browser.
For example: http://localhost:9080/casaservice1/casaPort1?page=0&row=0&column=0&.
When you open the Data Mashup virtual database in the browser, replace the zeros (0) in the string to change how the data is displayed.
Append the runtime inputs to the URL, appending =0& to FILE_LOC_S1_SUPPLIER_ADDRESS and appending =0 to FILE_LOC_S2_COMPANY_DATA.
The URL should now look similar to: http://localhost:9080/casaservice1/casaPort1?page=0&row=0&column=0& FILE_LOC_S1_SUPPLIER_ADDRESS=0&FILE_LOC_S2_COMPANY_DATA=0
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.
Click Save All.
Open a browser and copy the URL into it.
Replace the zeros in the URL string to change how the web service displays.
If you have any trouble viewing the data, see issue #65 in Known Data Mashup Issues.