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.