Title: Developing a JAXRPC based service from wsdl document in a web service environment
1Developing a JAX-RPC based service from wsdl
document in a web service environment
- Author E.Slabospitskaya
- Location IHEP, Protvino, Russia
2Necessary Tools
- 1) Sun Java -2 Software Development Kit Standard
Edition - J2sdk-1.4. 2_04
- 2) Tomcat 5.0 etc
- 3) jwsdp-1. 5 (Java Web Services Developer Pack)
- 4) Jwsdp 1.5 tutorial -?
- JAX-RPC for XML-based RPC is Java API for
developing and using Web-Services. This is a
collection of procedures that can be called by a
remote client over the Internet. JAX-RPC based on
SOAP. JAX-RPC defines runtime environment for
creating and executing XML-based remote procedure
calls.
3Files Location
Tutorial materials http//w3.ihep.su/egee/NA3_cou
rse.shtml - config.xml - BNQuoteService.wsdl -
bnclient.java - jwsdp.sh
- webservices_readme.txt List of Java WS
Developer Pack API http//java.sun.com/webservices
/docs/1.1/api/index.html List of Java WS
Developer Pack API http//
http
l
4Use JAX-RPC to create a web service
5Stubs and ties
Another important use for a WSDL document is as a
basis for creating stubs, the low-level classes
that are needed by a client to communicate with a
remote service. In the JAX-RPC implementation,
the tool that uses a WSDL document to generate
stubs is called wscompile. The JAX-RPC
implementation has another tool, called wsdeploy,
that creates ties, the low-level classes that the
server needs to communicate with a remote client.
Stubs and ties, then, perform analogous
functions, stubs on the client side and ties on
the server side. And in addition to generating
ties, wsdeploy can be used to create WSDL
documents.
6detailed description of what happens at runtime
- To call a remote procedure, the HelloClient
program invokes a method on a stub, a local
object that represents the remote service. - The stub invokes routines in the JAX-RPC runtime
system. - The runtime system converts the remote method
call into a SOAP message and then transmits the
message as an HTTP request. - When the server receives the HTTP request, the
JAX-RPC runtime system extracts the SOAP message
from the request and translates it into a method
call. - The JAX-RPC runtime system invokes the method on
the tie object. - The tie object invokes the method on the
implementation of the HelloWorld service. - The runtime system on the server converts the
method's response into a SOAP message and then
transmits the message back to the client as an
HTTP response. - On the client, the JAX-RPC runtime system
extracts the SOAP message from the HTTP response
and then translates it into a method response for
the HelloClient program.
7Who provides the layers
8Useful Commands for example
- wscompile.sh -genclient keep d . Config.xml
- javac bnclient.java
- java bnclient
9List of libraries
- CLASSPATH
- jwsdp-1.5/jaxrpc/lib/jaxrpc
-api.jar - jwsdp-1.5/jaxrpc/lib/jaxrpc
-impl.jar - jwsdp-1.5/jwsdp-shared/lib/
jaqname.jar - jwsdp-1.5/jwsdshared/lib/ac
tivation.jar - jwsdp-1.5/jwsdp-shared/lib/
mail.jar - jwsdp-1.5/saaj/lib/saaj-imp
l.jar - jwsdp1.5/jaxp/lib/endorsed/
xercesImpl.jar - jwsdp-1.5/jaxp/lib/endorsed
/dom.jar