axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Davis" <...@us.ibm.com>
Subject Re: writing handlers
Date Fri, 01 Jun 2001 14:46:03 GMT
How do handlers share data now? The msgContext.  If people want
to share data we can do what v2 does and allow the user to have
MsgContext in their method parameters.
-Dug


"Glen Daniels" <gdaniels@macromedia.com> on 06/01/2001 10:35:14 AM

Please respond to axis-dev@xml.apache.org

To:   <axis-dev@xml.apache.org>
cc:
Subject:  Re: writing handlers



> As for a use-case - write a header handler.  Would you rather
> write something like DebugHandler+DebugHeader or just a simple class
> with one method in it?  I know which one is easier to me.

Oh, I didn't actually notice this the first readthrough.

So, OK, I write:

class DebugHeaderHandler {
    public setDebugLevel(int level) { ...code... };
}

and then I deploy something like:

<headerHandler class="DebugHeaderHandler" qName="dbg:Debug"
               type="xsd:int" method="setDebugLevel"/>

Look about right?

OK, now you have the question of where you store whatever context data you
got
from the header.  If it's a separate class like this, you need either a
static
place to put context (like the Debug class), or you need some model of how
you
share information between the header handler classes and a) other header
handlers, and b) service classes.  This can get complicated pretty fast,
and it
allows a lot of non-standard models for information sharing, which might
reduce
interoperability.

--Glen





Mime
View raw message