| home / programming / java / webservices / chap3 / 3 | [previous] |
|
|
In this section we will discuss how to register the Job Resumé Repository Service using the command-line tool or the web-based tool.
Command Line
In order to register the service via the command line we need to have a deployment descriptor.
The name of the file that has the deployment descriptor for this service is
JobResumeRepositoryDD.xml. It is listed below:
<?xml version="1.0"?>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:JobResumeRepositoryService">
<isd:provider type="java"
scope="Application"
methods="retrieve submit">
<isd:java class="com.wrox.jobresume.service.JobResumeRepositoryService"
static="false"/>
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
<isd:mappings>
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="urn:jobresume" qname="x:resume"
javaType="com.wrox.jobresume.common.Resume"
java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
</isd:mappings>
</isd:service>
The command to register the service is:
> java org.apache.soap.server.ServiceManagerClient http://localhost:8080/soap/servlet/rpcrouter deploy JobResuméRepositoryDD.xml
If successful, nothing should be output to the screen.
Web-Based Tool
To access the administration tool point a browser to http://localhost:8080/soap/admin/.
Click the Deploy button and populate the form using the values in the following table
then click Deploy at the bottom of the page.
| ID | urn:JobResumeRepositoryService |
| Scope | Application |
| Methods | retrieve submit |
| Provider Type | Java |
| Provider Class | com.wrox.jobresume.service.JobResumeRepositoryService |
| Type Mapping | Encoding Style=SOAP,Namespace URI= urn:jobresume,Local Part= resume,Java Type= com.wrox.jobresume.common.Resume,Java to XML Serializer= org.apache.soap.encoding.soapenc.BeanSerializer,XML to Java Serializer= org.apache.soap.encoding.soapenc.BeanSerializer |
| Default Mapping Registry Class | org.apache.soap.server.DOMFaultListener |
Let's run the service to ensure that we set up the service and client correctly. This can be done
by restarting the Tomcat engine if it was already running or starting the Tomcat engine if it wasn't
started. Point a browser to http://localhost:8080/jobresumerepository, click
Retrieve resumé, enter 1000 and click Retreive.
If your screen looks like this:

Job Resume Repository System screen shot
Then you are configured properly. The resumé shown above is the default resumé.
| home / programming / java / webservices / chap3 / 3 | [previous] |
Created: May 30, 2002
Revised: May 30, 2002
URL: http://webreference.com/programming/java/webservices/chap3/3/3.html