Home - Internet Technologies - For Developers - How does it work? - W - Web Services Internals

After the Storm - Internet Technologies

Home
Internet Technologies
For Developers
How does it work?
B
E
J
S
T
W
Web Services Internals

Web Services Internals

Overview

How do Web Services work? Technically, Web Services are implemented as Servlets (see Servlet internals). Since you don't want to encode the details by hand you'll probably use a toolkit like Apache Axis that generates the stub from the WSDL, and provides a framework to implement the skeleton.

Client side. A Web Service locator (= URL of the WS) is obtained from a generated class. This locator is used to obtain the stub which then can be used to call methods of the remote Web Service.

Server side. The WS Servlet receives a JAX-RPC call, decodes ("unmarshalls") contained parameters, calls the implementation of the method, encodes ("marshalls") the result, and returns it.

Development

How do you implement a Web Service? Start out with interface IFoo extending Remote. The remotely accessible methods are public and throw a RemoteException. Then create a class FooImpl implementing interface IFoo. A WS container-specific tool then creates the stubs, ties, and a properties file. The compiled classes and the deployment descriptor are put into a WAR archive that gets deployed on the WS container.

To access the Web Services, use the method getIFoo on the stub FooServiceImpl to obtain a client stub for calling the Web Service methods.


© 1998-2005 Christian Treber, ct@ctreber.com. All rights reserved. The author takes no responsability for linked external pages, the content of which by no means reflect his own opinion, convictions etc.