Querying Oracle Database with Web Services

To learn XML DB Web Services, let’s build an application that manages stock trading data.

First, we create the following tables to store the stock trading transactions and client information (create_tables.sql):

CREATE TABLE stock_trans_tbl(

     client id     NUMBER,

     stock id     VARCHAR2(20),

     trans type     VARCHAR2(10),

     shares     NUMBER,

     stock_price     NUMBER);

CREATE TABLE client_tbl(

     client_id     NUMBER,

     username     VARCHAR2(20),

     client_pwd     RAW(16));

Next, we add the following client data (insert_data.sql):

INSERT INTO client_tbl VALUES(1,’jsmith’,

utl_raw.cast_to_raw(‘jsmith’||’good’));

To protect the client password, we use the database utl_raw.cast_to_raw() ...

Get Oracle Database 11g Building Oracle XML DB Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.