You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Vance Maverick <ma...@cs.unibo.it> on 2003/10/27 10:20:48 UTC

Can Handler in requestFlow act as pivot?

[I originally posted this to axis-user, but I didn't get any response
there.  It does lead to a development question, so it's not strictly
off-topic.]

I'd like to create a Handler in the global requestFlow (or something
very much like it) which is capable, in certain circumstances, of
acting as the pivot handler.  Usually, it would examine the request
and do nothing, letting the request flow continue down to the service
object in the ordinary way.  Sometimes, though, this Handler would
decide to supply the response itself.  In that case, I want it to halt
further processing of the request chain.  In particular, to avoid
redundant computation, the service object should *not* be invoked if
the Handler supplies a response.

Is there something in the ordinary Handler API which permits this?  I
tried setting the pastPivot property in the MessageContext, but that
didn't do it.  The service object was still invoked.  (Curiously, the
ultimate response was the one created by my Handler, not the one from 
the service object.)

Finally, if this behavior is not currently available, would it be
considered compatible with the overall architecture?  If so, I would
certainly be glad to undertake the work of developing it in the
appropriate way.

    Vance

PS.  Richard Zhu asked essentially the same question a month ago (see
http://marc.theaimsgroup.com/?l=axis-user&m=106434049304967&w=2), but
the thread trailed off inconclusively.  The only suggestion was to
provide this behavior at the servlet-engine level (as a filter), which
would be a burden in our case.  (It would mean that, in order to
reason about specifics of the service or request, the filter would
have to do its own SOAP parsing.)