muSOAing for 9/15/09

Let us talk about server side webservices. Since this is a vast and very technical subject we will stick to JAX-WS, SOAP (over HTTP) and JAXB which is quite standard and popular when it comes to implementing services. If you are using the JAX-WS container from Glassfish or even the containers from commercial vendors, a alot is accomplished through configuration.

Here the usecase is, a SOAP request is sent over HTTP to a service URL endpoint. The receiving component that services this call is a servlet. The very first thing that happens in the servlet is the dispatch of this call. The Dispatcher’s task is to send this request to the appropriate endpoint, in other words to the implementing class that will service this endpoint or function such as CreditCardCheck or AddressValidate, which will be sent the SOAPMessageContext that includes the complete SOAP message including payload.

Before your business logic to process this SOAP payload and headers actually happens, there is what is called a handler chain (specified in the config file as handler chain(s)). The handler chain classes mainly perform pre-validation and security related tasks. Once all the handlers have finished excuting, the objects are unmarshalled to their respective java objects thru the default JAXB binding mechanism. It is possible to substitute JAXB with another mechanism of your choice such as Castor or XMLBeans (my favorite).

Once processing is done, are response with or without SOAP Faults is sent back. Asynchronous processing is also possible which we will touch upon later. I will post post more detailed examples and information in my other blog ( since they are out of scope of this blog.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: