You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Jacob Marcus <ja...@gmail.com> on 2007/07/17 17:34:19 UTC

Access to MessageContext in the implementations. (XFire to CXF question)

In XFire, there was a very convenient way to get a handle to the
MessageContext in the web service implementations. This could be achieved by
adding a MessageContext paramater to the method signature.

Is there a similar strategy possible in CXF? Or is there a recomended
approach? I am a potential Spring simple front-end user who does not want to
use annotations.

Thanks in advance,
Jacob

Re: Access to MessageContext in the implementations. (XFire to CXF question)

Posted by Jacob Marcus <ja...@gmail.com>.
Neat! You guys rock!

On 7/17/07, Dan Diephouse <da...@envoisolutions.com> wrote:
>
> Additionally, in CXF you can access the Exchange object (which is the
> XFire
> MessageContext equivalent) by adding it to your web service's parameter:
>
> public String echo(String s, Exchange e) { ... }
>
> Cheers,
> - Dan
>
>
> On 7/17/07, Christopher Moesel <Ch...@avid.com> wrote:
> >
> > Hi Jacob,
> >
> > I'm not sure how to do this without annotations.  With annotations, you
> > would do this the JAX-WS approved way, by adding this to your service
> > implementation class:
> >
> > @Resource private WebServiceContext context;
> >
> > Then you could use the WebServiceContext object to get the message
> > details.  I'm not sure if there is a no-annotations way of doing it in
> > CXF.
> >
> > -Chris
> >
> > -----Original Message-----
> > From: Jacob Marcus [mailto:jacob.marcus@gmail.com]
> > Sent: Tuesday, July 17, 2007 11:34 AM
> > To: cxf-user@incubator.apache.org
> > Subject: Access to MessageContext in the implementations. (XFire to CXF
> > question)
> >
> > In XFire, there was a very convenient way to get a handle to the
> > MessageContext in the web service implementations. This could be
> > achieved by
> > adding a MessageContext paramater to the method signature.
> >
> > Is there a similar strategy possible in CXF? Or is there a recomended
> > approach? I am a potential Spring simple front-end user who does not
> > want to
> > use annotations.
> >
> > Thanks in advance,
> > Jacob
> >
>
>
>
> --
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
>

Re: Access to MessageContext in the implementations. (XFire to CXF question)

Posted by Dan Diephouse <da...@envoisolutions.com>.
Additionally, in CXF you can access the Exchange object (which is the XFire
MessageContext equivalent) by adding it to your web service's parameter:

public String echo(String s, Exchange e) { ... }

Cheers,
- Dan


On 7/17/07, Christopher Moesel <Ch...@avid.com> wrote:
>
> Hi Jacob,
>
> I'm not sure how to do this without annotations.  With annotations, you
> would do this the JAX-WS approved way, by adding this to your service
> implementation class:
>
> @Resource private WebServiceContext context;
>
> Then you could use the WebServiceContext object to get the message
> details.  I'm not sure if there is a no-annotations way of doing it in
> CXF.
>
> -Chris
>
> -----Original Message-----
> From: Jacob Marcus [mailto:jacob.marcus@gmail.com]
> Sent: Tuesday, July 17, 2007 11:34 AM
> To: cxf-user@incubator.apache.org
> Subject: Access to MessageContext in the implementations. (XFire to CXF
> question)
>
> In XFire, there was a very convenient way to get a handle to the
> MessageContext in the web service implementations. This could be
> achieved by
> adding a MessageContext paramater to the method signature.
>
> Is there a similar strategy possible in CXF? Or is there a recomended
> approach? I am a potential Spring simple front-end user who does not
> want to
> use annotations.
>
> Thanks in advance,
> Jacob
>



-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog

RE: Access to MessageContext in the implementations. (XFire to CXF question)

Posted by Christopher Moesel <Ch...@avid.com>.
Hi Jacob,

I'm not sure how to do this without annotations.  With annotations, you
would do this the JAX-WS approved way, by adding this to your service
implementation class:

@Resource private WebServiceContext context;     

Then you could use the WebServiceContext object to get the message
details.  I'm not sure if there is a no-annotations way of doing it in
CXF.

-Chris

-----Original Message-----
From: Jacob Marcus [mailto:jacob.marcus@gmail.com] 
Sent: Tuesday, July 17, 2007 11:34 AM
To: cxf-user@incubator.apache.org
Subject: Access to MessageContext in the implementations. (XFire to CXF
question)

In XFire, there was a very convenient way to get a handle to the
MessageContext in the web service implementations. This could be
achieved by
adding a MessageContext paramater to the method signature.

Is there a similar strategy possible in CXF? Or is there a recomended
approach? I am a potential Spring simple front-end user who does not
want to
use annotations.

Thanks in advance,
Jacob