axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian.Be...@wettschereck-partner.de
Subject AW: Howto enable sessions with axis
Date Thu, 05 Dec 2002 14:24:30 GMT
I worked myself through this code over there, but here is still a big
problem. Always, when I try to use the MessageContext.getCurrentContext()
method I get a NullPointerException.
I think there is something missing in my code, what I overread since now.
I read that I would have to include the SessionHandler on both sides (client
and server) inside the requestFlow. But: I actually dont use a wsdd for my
client. Do I have to? Everything I do is:

Service service = new Service();
Call call = (Call)service.createCall();
service.setMaintainSession(true);
if(MessageContext.getCurrentContext() == null)
{
	System.out.println("context is null");
}
call.setTargetEndpointAddress(new java.net.URL(endpoint));
QName operation = new QName(nameSpace, methodName);
call.setOperationName(operation);
Object returnval = call.invoke(new Object[]{args});
if(MessageContext.getCurrentContext() == null)
{
	System.out.println("context is null");
}

on both tests if the MessageContext is null, it is null. Ignoring the
MessageContext and the session, the webservice is running. What else do I
need? For example: How to deploy my client? Since now, I didnt find
something explaining this.

thanks for help from Hamburg/Germany

-----Urspr√ľngliche Nachricht-----
Von: Matthias Brunner [mailto:mb@blumenstrasse.vol.at] 
Gesendet: Mittwoch, 4. Dezember 2002 22:42
An: axis-user@xml.apache.org
Betreff: Re: Howto enable sessions with axis


On Wednesday 04 December 2002 17:25, 
Sebastian.Beyer@wettschereck-partner.de wrote:
> I know this is not supposed to be a very hard question, but I'm 
> searching for some sample-code or explanation how to enable 
> session-handling in axis. I'm using a Tomcat 4.0.4 as Axis-server and 
> a simple java-console-application as a client.
> So, what do I have to do to, for example, store authentication
> data inside a session?

Have a look at the session test in the source distribution of axis.
-- 
Matthias Brunner <mb@blumenstrasse.vol.at>
PGP FP 7862 32B3 3B75 292A F76F  5042 8587 21AB 5B89 D501
Check out http://blumenstrasse.vol.at/~mb/gpgkey.asc

Mime
View raw message