axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanjiva Weerawarana <>
Subject Re: [Axis2] Problems with MessageContext
Date Mon, 10 Jul 2006 16:53:14 GMT
On Mon, 2006-07-10 at 11:33 +0200, Carsten Ziegeler wrote:
> While playing around with implementing my own handler, I found out,
> that the getProperties() method of the MessageContext is not implemented
> correctly: MessageContext overrides the property handling of the parent
> class by setting/getting properties from the Options object. But
> getProperties() is passed on to the parent class which then always
> returns an empty map. (Using getOptions().getProperties() of course works).
> If you need an implementation for getProperties() which uses the Options
> object I can provide it.

IIRC, the behavior desired was for just the message context to use
options' properties instead of using the local hashtable. This has
something to do with allowing users to set stuff from outside via
options and having them take effect at the various contexts.

So if the property is not found via options.getProperty() then we cross
over to whatever level of other context is around (operation or service
or .. etc.) and ask there. 

Note that setProperty() too has been overridden to match this behavior.

So in effect the properties hashtable inherited from the superclass is
not used by the MessageContext class.

> In addition it seems that the outgoing MessageContext objects do not
> contain the servlet context. Is this by mistake or by design? If it's
> the latter, how can I access the servlet context?

Its by design- you have to get the operation context from the outgoing
MC and then get the incoming MC from that and look there for the servlet
context and any other "incoming" info.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message