Turning Web Sites into Web Services
by Jesper Jørgensen
08/15/2005
The Example Explained
I will do things a little backwards here. Someone may create a control with certain functionality and then use this to create a Web service or some other application that uses this. I will first create a Web service, and then, in the process of adding a control to this, I will create the control.
Creating a new Web service
To create a new Web service, you right-click the Web service project in which you want to create it, and then select New > Web Service, as Figure 3 shows.
Figure 3. Creating a Web service
This selection launches the New File Wizard (see Figure 4) with file type Web Service preselected. You just need to enter a name for the Web service, and then click Create.
Figure 4. Selecting the name for the Web service
Creating the RoboSuite control
Now that the Web service is created, the next step is the creation of the RoboSuite control. You right-click the Web service and choose Add Control > RoboSuite Control, as Figure 5 shows. This launches the Insert Control Wizard (see Figure 6). This wizard is essentially a standard WebLogic Workshop wizard, but one in which Step 3 will depend on the kind of control you have selected.
Figure 5. Adding a RoboSuite control
The first two steps in the wizard are naming the control instance in the Web service and naming the control file (the generated JCX-file). You select the name
phone
for the instance. This corresponds to a field name in the Java-like JCX-file, so you follow standard Java naming convention for this. The name of the JCX-file is similar to the name of a Java class. Choosing the package name
controls
for the control is both practical and necessary. The JCX-file is placed in a folder called
controls
that provides some structure to the application (besides, you cannot place a control in the default top-level package).
Figure 6. Naming the control
The final step of the wizard is the configuration of the control. This step consists of several different substeps. The first step is selecting the library where the robots are located. In this case the robots are located in a robot library file called phone.robotlib in the local file system, so you select the option Robot Library File at URL (see Figure 7). The other possible robot locations are described in the documentation that comes with the control or RoboSuite. I will not go into any more detail here.
Figure 7. Selecting the Robot Library location