Thanks for that tipp, but I where did you get the classes Stub, Locator etc.
>From the WSDL2Java? If yes, do I have to use this? Or is it also possible,
not to work with generated files. Or would it be dumb to try to invent the
wheel?
Where is described how tu use the generated files? The online User-Guide
does not explain everything I think, or did I just not read carefully
enough?

help would be of course still appreciated

Greetings from Hamburg/Germany

-----Ursprüngliche Nachricht-----
Von: niksa_os [mailto:[EMAIL PROTECTED]] 
Gesendet: Freitag, 6. Dezember 2002 21:19
An: [EMAIL PROTECTED]
Betreff: Re: AW: Howto enable sessions with axis


Try this:

Bean1ServicePortType stub = null;
...................

stub = new Bean1ServiceLocator().getBean1ServicePort();
// SET SESSION FOR THIS WEB SERVICE
((Bean1ServicePortSoapBindingStub) stub).setMaintainSession(true);
stub.setSample(jTextField1.getText());

This works for me.
I get it by myself in 3 sleepless nights!

Tell me if this work for you!!!

Hope it helps!


> For me, the code from SessionTest was not of any help :o(((
>
> This happened in my own case. getCurrentContext() returns null when
running
> axis as a client. Have no idea why... maybe because I did not supply 
> an
wsdd
> client file ?!?!?
>
> IN order to enable session tracking, I have done the following:
>
> My service (server) is scope="Application" (don't want a session 
> scope).
>
> I have an entry method for my service, called "Login". When you 
> connect
from
> client to service by calling login method, the service gives you a 
> Cookie. (Set Cookie:blah blah blah; /axis). You have to keep this 
> cookie on client and all the calls that you will make to the server 
> should contain the
coockie.
>
> Here comes the bad part: On client, I create ca 
> Session().createCall().
Set
> the call to Login method. set the call.setMantainSession( true )
(something
> like this) and call the login.
>
> Then, whatever call I am going to make, I am going to use the same 
> Call object wich I have used for login. The call object keeps the 
> cookie and
sends
> it all the time you ask for a method.
>
> What I don't like is that I have to keep the same Call object, and 
> this
seems
> not to be normal. But if I try to create a new Call object, I don't 
> know
how
> to obtain the session id from the old one and how to set it on the now
one???
>
> Hope it helps,
> dovle

Reply via email to