Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The role of SAAJ when creating a message handler

 
Arne Mark
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,

Objective 4.7 is: "Use the JAX-RPC Handler API to create a SOAP message handler, describe the function of a handler chain, and describe the role of SAAJ when creating a message handler."

While the first two parts of the objective are clear to me, I cannot figure out the role of SAAJ when creating a message handler yet. Who can help?

Thanks a lot!

Cheers,
Arne (taking the exam on June 4th)
 
Jack Zhou
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SAAJ is involved when you implement the logic for handleXXX() methods. You man want to get object whose typed are in SAAJ, eg.
javax.xml.soap.SOAPHeader, javax.xml.soap.SOAPMessage.
However, if you want to define a handler simply to count the number of messages your endpoint handles or to print out "Hello, sender", you don't need SAAJ.

Acutally I guess JAX-RPC API is independent of SAAJ.
Please correct me if I am wrong.
 
Andy Smith
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MessageContext is passed as a parameter to the handleXXX Methods, from which u can get the SOAPMEssageContext create ur SOAPMessage from it... and modify as per ur needs..

AS per my understanding the handlers are used to read/modify the SOAP which are getting passed to as a request/ response....
And SAAJ provides the facility for doing that...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic