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

Sr Instructional Designer D2L-Moodle,Clearance
WSI Nationwide, Inc.
US-NJ-Fort Monmouth

Justtechjobs.com Post A Job | Post A Resume
Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs


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, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint

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

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