ItemsDB_XMLBean_Client.jws Sample

This topic inludes the source code for the ItemsDB_XMLBean_Client.jws Sample.

Sample Location

This sample is located in the following directory in your WebLogic Workshop installation:

BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebServices/database/xmlBean/

Sample Source Code


01 package database.xmlBean; 
02 
03 import java.sql.SQLException;
04 import org.openuri.dbcontrol.xmlbean.ItemsArrayDocument;
05 
06 /**
07  
08  <p>The methods of the this web service return XMLBean datatypes.
09  
10  <p>The XMLBean datatypes ItemsArrayDocument and ItemType were generated from the schema file
11  * ItemsArray.xsd (in the Schemas project).  
12  
13  * @common:target-namespace namespace="http://workshop.bea.com/ItemsWebService"
14  */
15 public class ItemsDB_XMLBean_Client implements com.bea.jws.WebService
16 
17     /**
18      * @common:control
19      */
20     private database.xmlBean.ItemsDB_XMLBean items;
21 
22     static final long serialVersionUID = 1L;
23 
24     /**
25      <p>The following method returns an ItemsArrayDocument type,
26      * an XMLBean type based on the schema ItemsArray.xsd.
27      
28      <p>See the Schemas folder for the schema ItemsArray.xsd, and its corresponding XMLBean classes.
29      
30      * @common:operation
31      */
32     public ItemsArrayDocument getAllItems()
33         throws SQLException
34     {
35         return items.getAllItems();
36     }
37 
38 
39     /**
40      <p>The following method returns an ItemType type,
41      * an XMLBean type based on the schema ItemsArray.xsd.
42      
43      <p>See the Schemas folder for the schema ItemsArray.xsd, and its corresponding XMLBean classes.
44      
45      <p>Enter an integer between 624 and 664.
46      
47      * @common:operation
48      */
49     public org.openuri.dbcontrol.xmlbean.ItemType getIndividualItem(int itemNumberthrows java.sql.SQLException
50     {
51         return items.getIndividualItem(itemNumber);
52     }
53