Daniel,
On the server you can add a SOAPContext parameter to your methods like this
(it must be the first) :
public String sayHelloTo(SOAPContext context,
String name)
then :
context.getProperty(Constants.BAG_HTTPSESSION);
gets you the session object.
See the Apache SOAP User Guide, Migration Issues, Getting at environmental
information for RPC style services. This explains the mechanism.
Neal.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 31 October 2001 10:15
To: [EMAIL PROTECTED]
Subject: Re: session maintance
Hi Oleg,
have you set up the scope of the deployed service to session.
I have nearly the same question.
>HttpSession session = (HttpSession)
>cnt.getProperty(Constants.BAG_HTTPSESSION);
>session.getID();
these lines will help me. Because I didnt know up to now,
how I can get a session from the CALL.
But there is another question. How can I access the session on server side
to handle it.
I use SOAP from Apache and if I only write a server looks like this.
package hello;
import java.util.*;
public class HelloServer {
private Hashtable names = new Hashtable();
private int count = 0;
public Hashtable getAllNames()
{
return names;
}
public HelloServer() {
super();
}
public String sayHelloTo(String name)
{
names.put("User" + (count++), name);
return "Hello " + name + ", How are you? /" + count;
}
}
I have no idea how to get the session. Can you give me a hint?
thx daniel
____________________________________________
SinnerSchrader Deutschland GmbH
Communication & Technology
mailto:[EMAIL PROTECTED]
http://www.sinnerschrader.com
fon +49.(0) 40.39 88 55-0
fax +49.(0) 40.39 88 55-55
gasstrasse 8-16 | 22761 hamburg | germany
____________________________________________