Recommended: Sing it, brah! 5 fabulous songs for developers
JW's Top 5
Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Page 4 of 7
There are two ways to deploy a service in Apache SOAP: use the Web-based administration tool or deploy via the command line. Either choice will deploy your service and make it available to clients.
Use the administration tool
To use the administration tool, point your browser to http://localhost:8080/apache-soap/admin, which should bring up the window
shown in Figure 1. Now click on the Deploy button in the left frame. A form with a number of fields should pop up. Not all
of the fields are relevant at this time. I will explain the meaning of each field as you use it. Since you will not use all
the fields in this article, a few will remain a mystery. But don't worry; by the end of Part 3, I will cover all the fields.
The ID field is used to set the object ID; as described above, the object ID is used by the SOAP infrastructure to tie an RPC request to a SOAP service. As I mentioned earlier, all Apache SOAP services must have an object ID that is unique among all the deployed services for that server. I generally use the format urn:<UniqueServiceID>, -- UniqueServiceID is the unique object ID for my service. For this example, set the ID to urn:Hello.
You use the Scope field to define the lifetime of the service instance serving the invocation request. Scope may have one of the following values:
It is important to remember that Scope's value can have important security implications. The page and request values assure
the isolation of successive calls. At the other extreme, the application value implies that all users of the SOAP server share
the service instance. Astute readers may have noticed that those values are also used by the <jsp:useBean> tag in JSPs. In fact, the rpcrouter servlet was once a JSP page; that's probably how these values were chosen. For this example, set the scope to application.
Set the Methods field to a white-space-delimited list of method names that can be invoked on the service that is being deployed.
Your example service only supports one method, sayHelloTo.
Set the Provider Type field to Java. That means the service has been implemented in Java and you need to provide Apache SOAP with the service's fully qualified
class name. Complete this task in the Provider Class field, which should be set to hello.HelloServer. Since the sayHelloTo method is not static, keep the Static field as is -- that is, no.
Now scroll down to the bottom of the browser window and click the Deploy button just below the form (not the Deploy button in the left frame). To verify that the service deployed, click the List button in the left frame. One of the services in the list that shows up should be the urn:Hello service.