You need to set a scope for the property. In a handler, properties default to "Handler" scope and thus are only available to handlers. You need to call: lmc.setScope(Constants.MY_CONSTANT, MessageContext.Scope.APPLICATION); to make it Application scoped.
Dan On Thursday 14 February 2008, Davide Gesino wrote: > How can I put a variable in an handler and access it from the > MessageContext once I have reached the endpoint? > I have injected the WebServiceContext in my endpoint (with the > @resource annotation). > I have put an object in my handler in a SoapMessageContext as a key > pair value: > > public boolean handleMessage(LogicalMessageContext lmc) { > > lmc.put(Constants.MY_CONSTANT, new Date()); > > return true; > } > > and I expected the variable > > would have been accessed as: > > context.getMessageContext().get(Constants.MY_CONSTANT); > > Anyway what i get is null. Where is my fault?? -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog