CustomerDBClient.jws Sample
A sample that demonstrates use of a database control by managing customer records. CustomerDBClient is a client of CustomerDBControl.ctrl. Together they demonstrate construction of a Database control and use of a Database control by a web service. CustomerDBControl.ctrl demonstrates use of SQL's CREATE, DROP, INSERT, UPDATE, and SELECT statements.
Use of a Database control
This sample is located in the database folder of the samples WebLogic Workshop project. In the file system the location is:
BEA_HOME\weblogic700\samples\workshop\applications\database\CustomerDBClient.jws
To run this web service:
Start WebLogic Server in the appropriate domain.
On Microsoft Windows systems, from the Start menu navigate to:
BEA WebLogic Platform 7.0->WebLogic Workshop->WebLogic Workshop Examples->Start Examples Server.
On Linux or Solaris systems, run:
BEA_HOME/weblogic700/samples/workshop/startWebLogic.sh
Launch the service either by opening it in WebLogic Workshop and selecting the Start operation or by entering http://localhost:7001/samples/database/CustomerDBClient.jws in the address bar of your browser. If WebLogic Server is running in the appropriate domain on this machine, you may click here to run the sample.
Navigate to the Test Form tab of Test View, if necessary.
Invoke the createCustomerTable method to create the database table and populate it with test data.
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.
Select log entries in the Message Log to see the message traffic involved in each interaction.
Examine the source code for CustomerDBClient.jws and CustomerDBControl.ctrl to see how the CTRL file defines database operations and method shape and the web service uses the methods and data structures provided by the Database control.
LuckyNumberDBClient.jws Sample
Controls: Using Resources from a Web Service