wood burning stoves 2.0*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Handlers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Handlers" Watch "Handlers" New topic


Roy Pozarelli
Ranch Hand

Joined: Oct 17, 2009
Posts: 39
In prepping for the certification I have the following question:
in javax.xml.rpc.handler.Handler you have handleRequest(MessageContext context) and handleResponse(MessageContext context)
in javax.xml.ws.handler.Handler<C extends MessageContext> you have handleMessage(C context)

Now it seems to me that you have to use the MessageContext field MESSAGE_OUTBOUND_PROPERTY to make the distinction between in/out bound message direction vs. the "rpc" handler that had the container making that distinction, i.e. the logic was moved from the container to the implementor of the handler.

WHY was this done?

Is there another idea here in that the purpose of the handler should not care about direction? i.e. it should be performing the same behavior irrespective of the direction of the message?

OCP Java SE 6 Programmer,
OCM Java SE 6 Developer
OCE Web Components
MySQL Certified Administrator & Developer,
OMG Certified UML Prof. Fund., Int., Adv.
davide boleso
Ranch Hand

Joined: Jul 15, 2012
Posts: 39
Hello reading your question I noticed it's not clear to me wich specification are used for the exam
I was sure the exam was based on http://jax-ws.java.net/nonav/jaxws-api/2.2/ where you have only logicalHanderl and soapHandler
according to your question you are using http://docs.oracle.com/javaee/6/api/javax/xml/rpc/handler/Handler.html that are organized differently
wich API are required for the exam ?

I agree. Here's the link: http://aspose.com/file-tools
subject: Handlers
Similar Threads
Question about design of WS clients and their handlers
Question about message handlers and their interaction with a WS client
JAX-RPC web service soap message handler issues
remove namespace from webservice response
Request and Response handlers (Axis2)