document
The Sun JWSDP 1.6 by default is installed in C:\Sun\jwsdp-1.6, which I will refer to
as JWSDP_HOME. Let us also create a work folder C:\EXAMPLES\
<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
<wsdl location="customer-service.wsdl"
packageName="com.vinod.service" />
</configuration>
PATH=%PATH%;C:\Sun\jwsdp-1.6\jaxrpc\bin
• Customer.class
• Customer_LiteralSerializer.class
• CustomerServicePortType.class
• CustomerService_SerializerRegistry.class
• CustomerServicePortType_Tie.class
• CustomerServicePortType.java
• CustomerService_SerializerRegistry.java
• Customer.java
• Customer_LiteralSerializer.java
• CustomerServicePortType_Tie.java
Now that the serverside artifacts are ready, it is time to create the web application to
deploy our web service
1. Open Eclipse and create a dynamic web project named
CustomerInfoWSApp (or something that suites your application)
2. Copy the following jar files into your application’s WEB-INF\lib folder
• %JWSDP_HOME%\fastinfoset\lib\FastInfoset.jar
• %JWSDP_HOME%\jaxrpc\lib\jaxrpc-api.jar
• %JWSDP_HOME%\jaxrpc\lib\jaxrpc-impl.jar
• %JWSDP_HOME%\jaxrpc\lib\jaxrpc-spi.jar
• %JWSDP_HOME%\saaj\lib\saaj-api.jar
• %JWSDP_HOME%\saaj\lib\saaj-impl.jar
• %JWSDP_HOME%\sjsxp\lib\jsr173_api.jar
• %JWSDP_HOME%\jwsdp-shared\lib\activation.jar
• %JWSDP_HOME%\jwsdp-shared\lib\mail.jar
3. We must redirect all the client requests for the web service endpoint to a
servlet (com.sun.xml.rpc.server.http.JAXRPCServlet) that is supplied with
JWSDP. This is done by making the following additions to the web.xml of our
application
<?xml version="1.0"?>
<endpoints
xmlns='http://java.sun.com/xml/ns/jax-rpc/ri/runtime'
version="1.0">
<endpoint
name="customerservice"
interface="com.vinod.service.CustomerServicePortType"
implementation
="com.vinod.service.CustomerServicePortType_Impl"
tie="com.vinod.service.CustomerServicePortType_Tie"
wsdl="/WEB-INF/CustomerService.wsdl"
service="CustomerService"
port="CustomerServicePort"
urlpattern="/CustomerService"/>
</endpoints>
5. Create a package com.vinod.service (this must match the one used in the
config.xml) and copy all the Java source files to this package
If everything goes well, you must be able to see the service and the WSDL from the
following locations:
http://localhost:8080/CustomerInfoWSApp/CustomerService
http://localhost:8080/CustomerInfoWSApp/CustomerService?WSDL