# DB-Web Service Sample Query Readme

A copy of this readme is included with the db-webservice sample in your Liquid Data installation at <WL_HOME>/liquiddata/samples/buildQuery/db-webservice/readme.htm. (The default install home for Liquid Data is bea/weblogic700.)

This readme includes the following topics:

- What this Query Demonstrates
- How to Run the Query
- If You Want to Re-create the Query . . .

## What this Query Demonstrates

This query demonstrates how to use Liquid Data to create an integrated view that demonstrates the connection of two different Enterprise Information Systems (EIS), database, and Web Service. Creating an integrated view provides the ability to seamlessly access separate EISs using a single query.

For example, a wireless service provider uses a relational database management system to manage its product information. The sales price of these product is computed using a Web Service. To provide an integrated product and price information, we use liquidData engine to seamlessly access product and price across different types of Enterprise Information Systems (EIS).

## How to Run the Query

1. Start the Liquid Data Samples server.
2. Start the Data View Builder.
3. In the Data View Builder, open the following project file: <WL_HOME>/liquiddata/samples/buildQuery/db-webservice/WSPricer.qpr
4. Click the Test tab. (This shows the generated query statement.)
5. Click the "Run Query" button and view the XML result.

## If You Want to Re-create the Query . . .

### Configure the Data Sources in the Administration Console

1. Configure the Wireless relational database data source as follows:
   - JDBC connection pool: MyWirelessPool (username=wireless, password=wireless)
   - JDBC data source: MyWirelessDS
   - Liquid Data "Relational Database" data source: MyWireless-LD-DS (Schema=WIRELESS)
2. Configure the Price Web Service Liquid Data data source as follows:
   - Name: Pricer
   - WSDL: http://localhost:7001/wspricer/ws/Pricer?WSDL

### Build the Query in the Data View Builder

1. Create a new project.
2. Open the Data Sources you just defined: A Web Service "Pricer" and a Relational Database“PB-WL”
3. Add pricer.xsd from the repository as the target schema
4. Map source to target elements as follows:
   - Map the Product_Name from source PB-WL->db->Products to corresponding element in Target PRODUCTPRICE->PRODUCT->NAME.
   - Map the anySimpleType from source Pricer->getSalesPrice- to corresponding element in Target PRODUCTPRICE->PRODUCT->SALESPRICE.
5. Create an association between PRODUCTS and getSalesPrice by dragging PRODUCT_NAME in PB-WL->PRODUCTS->PRODUCT_NAME to geSalesPrice function ->Parameters ->string
6. Run the query. (Click the Test tab and click Run Query button.)

### Reference

- You can view the wireless data base schema file at <WL_HOME>/liquiddata/samples/config/ld_samples/scripts/ddl/WIRELESSP.sql
- You can view the target schema at <WL_HOME>/liquiddata/samples/config/ld_samples/ldrepository/schemas/pricer.xsd
- You can access the WSDL File at: http://localhost:7001/wspricer/Pricer?WSDL
- You can view the query statement at <WL_HOME>/liquiddata/samples/config/ld_samples/ldrepository/stored_queries/ SalesPrice.xq