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

Technical Lead
Thomson Reuters (Markets) LLC
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume
Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?


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]

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

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

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business

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

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