CustomerDBClient.jws Sample

A sample that demonstrates use of a database control by managing customer records. CustomerDBClient is a client of CustomerDBControl.jcx. Together they demonstrate construction of a Database control and use of a Database control by a web service. CustomerDBControl.jcx demonstrates use of SQL's CREATE, DROP, INSERT, UPDATE, and SELECT statements.

Concepts Demonstrated by this Sample

Location of Sample Files

This sample is located in the database folder of the WebServices project in the SamplesApp sample application. In the file system the location is:

BEA_HOME\weblogic81\samples\workshop\SamplesApp\WebServices\database\customer_db\CustomerDBClient.jws

To Run the Sample

  1. Start WebLogic Server in the appropriate domain.
  2. Launch the service either by opening it in WebLogic Workshop and selecting the Start operation or by entering http://localhost:7001/WebServices/database/CustomerDBClient.jws in the address bar of your browser. If WebLogic Server is running in the appropriate domain on this machine and you have deployed the SamplesApp sample application, you may click here to run the sample.
  3. Navigate to the Test Form tab of Test View, if necessary.
  4. Invoke the insertCustomer or insertCustomerObj method to create the database table and populate it with test data.
  5. Use other methods in the interface to query the database in various ways. Until you insert additional records, valid customer IDs are 1, 2 or 3.
  6. Select log entries in the Message Log to see the essage traffic involved in each interaction.
  7. Examine the source code for CustomerDBClient.jws and CustomerDBControl.jcx to see how the JCX file defines database operations and method shape and the web service uses the methods and data structures provided by the Database control.

Related Topics

LuckyNumberDBClient.jws Sample

Using WebLogic Built-In Controls

Database Control Design Issues

Test View