You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Frizz <fr...@googlemail.com> on 2013/09/14 00:07:49 UTC
How to access fields in org.apache.cxf.transport.Session?
Hello,
I have an Interceptor like this:
public void handleMessage(Message msg) throws Fault {
BindingOperationInfo binding =
msg.getExchange().getBindingOperationInfo();
if (binding != null) {
String requestUri = (String)msg.get(Message.REQUEST_URI);
Session session = msg.getExchange().getSession();
...
How do I access fields of the Session, like a Session ID? All that
org.apache.cxf.transport.Session offers is one method get(Object key). How
do I use that?
cheers,
F.
RE: How to access fields in org.apache.cxf.transport.Session?
Posted by Andrei Shakirin <as...@talend.com>.
Hi,
Take a look at https://svn.apache.org/repos/asf/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/GreeterSessionImpl.java
It gets HTTPSession name attribute:
String name = (String)session.getAttribute("name");
Regards,
Andrei.
> -----Original Message-----
> From: Frizz [mailto:frizzthecat@googlemail.com]
> Sent: Samstag, 14. September 2013 00:08
> To: users@cxf.apache.org
> Subject: How to access fields in org.apache.cxf.transport.Session?
>
> Hello,
>
> I have an Interceptor like this:
>
> public void handleMessage(Message msg) throws Fault {
>
> BindingOperationInfo binding =
> msg.getExchange().getBindingOperationInfo();
>
> if (binding != null) {
> String requestUri = (String)msg.get(Message.REQUEST_URI);
> Session session = msg.getExchange().getSession(); ...
>
> How do I access fields of the Session, like a Session ID? All that
> org.apache.cxf.transport.Session offers is one method get(Object key). How
> do I use that?
>
> cheers,
> F.