Arjun Reddy wrote:Thanks Christopher and Alex for replying.
Christopher- I was looking at the link you replied back and I have a question. How do I get a reference to the SOAPMessageContext?
If you're going to go the handler route, then if you need a SOAPMessageContext
you should write a Handler that implements SOAPHandler. The JAXWS runtime will pass the handleMessage() method of your handler an instance of SOAPMessageContext. From the SOAPMessageContext you can get a SOAPMessage with the getMessage() method. This will allow you programmatic access to all elements of the entire
SOAP message envelope. If, on the other hand, you only need access to the message body payload, you can implement the LogicalHandler interface in which case the JAXWS runtime will give the handleMessage() method a LogicalMessageContext on which you may invoke getMessage() to obtain a LogicalMessage. From this LogicalMessage you can invoke one of its getPayload(...) methods to get the body contents of the message as a couple different types...
Better yet...here, read this:
http://jax-ws.java.net/articles/handlers_introduction.html
and this:
http://download.oracle.com/javase/6/docs/api/index.html?javax/xml/ws/handler/soap/SOAPMessageContext.html