You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Pawel Janusz <pj...@intertele.pl> on 2007/09/05 10:56:11 UTC
Message Object
Hello,
I do know how to get MessageContext Object in WebMethod, but is there
any possibility to get Message from it? or I have to implement Interceptor ?
Thanks
Pawel
Re: Message Object
Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday 05 September 2007, Pawel Janusz wrote:
> Hello,
>
> I do know how to get MessageContext Object in WebMethod, but is there
> any possibility to get Message from it? or I have to implement
> Interceptor ?
>
> Thanks
> Pawel
Well, you can cast the MessageContext object to a
org.apache.cxf.jaxws.context.WrappedMessageContext object and call the
getWrappedMessage() on it. That would work.
I'm adding the ability to do:
Message msg = (Message)ctx.get(Message.class.getName());
to it. Should be in for 2.0.2.
--
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727 C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog