You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by cj91 <Jo...@argushealth.com> on 2009/06/11 19:32:42 UTC
Purpose of message.getId? Returning null in CXF
In some code that we are porting from XFire to CXF:
externalSessionId = soapMessage.getId();
In XFire, it seems this used to return a session identifier. We use this in
a custom interceptor to match different bits of tracking data together since
they belong to same invocation.
We're port the xfire handler to a cxf interceptor, but it seems that we are
getting a null String from cxf on this method. Should we be using it for
this purpose? Is there something that CXF generates (like a sessionid... I
know I know webservices are stateless) that we could use to identify a
specific invocation of our services?
Many thanks, and thank you for hard work on this project. I can't imagine
implementing webservices any other way!
--
View this message in context: http://www.nabble.com/Purpose-of-message.getId--Returning-null-in-CXF-tp23985795p23985795.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Purpose of message.getId? Returning null in CXF
Posted by Daniel Kulp <dk...@apache.org>.
Interesting. I just checked the entire codebase and there are not ANY calls
to Message.getId or Message.setId. Thus, I would say they are "left over"
bits from the XFire migration that probably either shouldn't be there, or
should be implemented. Not sure which really. :-)
Usually what you do is generate your own ID of some sort and do something
like:
message.getExchange().put("My.Key.Identifier", key);
that you can then get later to correlate.
Dan
On Thu June 11 2009 1:32:42 pm cj91 wrote:
> In some code that we are porting from XFire to CXF:
> externalSessionId = soapMessage.getId();
>
> In XFire, it seems this used to return a session identifier. We use this in
> a custom interceptor to match different bits of tracking data together
> since they belong to same invocation.
>
> We're port the xfire handler to a cxf interceptor, but it seems that we are
> getting a null String from cxf on this method. Should we be using it for
> this purpose? Is there something that CXF generates (like a sessionid... I
> know I know webservices are stateless) that we could use to identify a
> specific invocation of our services?
>
> Many thanks, and thank you for hard work on this project. I can't imagine
> implementing webservices any other way!
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog