spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / programming / java / webservices / chap3 / 3 To page 1To page 2current page
[previous]

Professional Java Web Services

Oracle DBA (IL)
Next Step Systems
US-IL-Lombard

Justtechjobs.com Post A Job | Post A Resume
Developer News
OpenOffice 3.2 Lands Amid Critical Changes
Red Hat, IBM Firmly in KVM Virtualization Camp
Red Hat Talks Up Open Source Cloud Plans


Registering the Service

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.

IDurn:JobResumeRepositoryService
ScopeApplication
Methodsretrieve submit
Provider TypeJava
Provider Classcom.wrox.jobresume.service.JobResumeRepositoryService
Type MappingEncoding 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 Classorg.apache.soap.server.DOMFaultListener

Running the Service

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
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 To page 1To page 2current page
[previous]


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

webref The latest from WebReference.com Browse >
Search Engine Optimization: Selecting and Embedding Keywords · Are Google's Language Translation Web Services Ready for Prime Time? · Installing and Using Meeplace, the Business Review CMS
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
IBM DB2 10 for z/OS: Justifying the Upgrade · Living La Vida Colo: Choosing the Right Colocation Facility · FTC Concerns over Social Media Privacy Linger

Created: May 30, 2002
Revised: May 30, 2002

URL: http://webreference.com/programming/java/webservices/chap3/3/3.html