Hello everyone,
I've been looking at the axis wiki trying to follow the information
about enabling sessions. I want to use sessions with http cookies but I
cann't seem to get it to work.
Here is two sections of code that I thought would work.
The setup is this;
TestServiceLocator serviceLocator = new TestServiceLocator();
TestBindingStub binding = (TestBindingStub) serviceLocator.getTesting();
binding.setTimeout(60000);
binding.setMaintainSession(true);
And, this is what I'm doing to call my test service;
for (int i=0; i < 4; i++) {
System.out.println("Request " + i);
Param_THolder paramHolder = new Param_THolder();
binding.delayMethod(paramHolder);
MessageContext messageContext =
binding._getCall().getMessageContext();
String cookie1 = (String)
messageContext.getProperty(HTTPConstants.HEADER_COOKIE);
String cookie2 = (String)
messageContext.getProperty(HTTPConstants.HEADER_COOKIE2);
System.out.println("cookie1 : '" + cookie1 + "'");
System.out.println("cookie2 : '" + cookie2 + "'");
}
Every time the cookie values are null.
I also have the server logging the session used and each time it's a new
session. So I'm getting a new session with every call.
What am I missing, do I have to create/install a handler to set the
session in the MessageContext for the requests on the server? The only
example I see is for maintaining sessions with the soap headers
(SimpleSessionHandler), which I don't really want to do. Is there one
for http cookies?
Thx
============================================================
The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader
of this message is not the intended recipient, or an employee
or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any reproduction,
dissemination or distribution of this communication is strictly
prohibited. If you have received this communication in error,
please notify us immediately by replying to the message and
deleting it from your computer. Thank you. Tellabs
============================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]