Hi Srinivas,
sorry, but I used session management only in one web service; I don't have
any experience in multiple services.
So I can't help you.
I think you have to modify the SimpleSessionHandler for services other than
login service to check if the caller has a valid session. The
SimpleSessionHandler keeps a property in MessageContext with sessionID.
There is a timeout to limit the possibilty that the caller uses a sessionID
without having a valid session.
Sorry for my English and if I wrote inaccuracies.
Stefano
----- Original Message -----
From: Srinivas Vemula
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, June 10, 2004 12:36 PM
Subject: Re: Session
Hi Stefano,
If you remember, we stumbled upon the same problem on how to send
sessions using headers from axis to .net client and back. As I was dealing
with one service maintaining sessions was a snap with the technique of
sending headers. Now, I would like to know if there is a way to persist
this information across multiple services.
Ex- One service has a method login, which upon sucessfull auth initiates a
session mgmt process by including the headers, client makes another call on
a different service for some other functionality. Client can include the
sessionID which he got from login method in the request header which he
sends for the new request, If I retrieve the sessionID from the second
method invocation? How would I verify that the session ID that I got is
indeed a valid session and the caller has gone through the auth process
before invoking it.
Thank you for all your time and help
Srini
Stefano Sambi wrote:
Sorry for my late reply.
Here is what I added to my wsdl to manage session:
1) Add this namespace declaration in root element of wsdl file (in
<wsdl:definitions>):
xmlns:session=http://xml.apache.org/axis/session
2) Add this schema definition to <wsdl:types>:
<schema targetNamespace="http://xml.apache.org/axis/session"
xmlns="http://www.w3.org/2001/XMLSchema">
<simpleType name="session">
<restriction base="xsd:long"/></simpleType>
<element name="sessionID" type="session:session"/></schema>
3) Add this wsdl message:
<wsdl:message name="soapHeader">
<wsdl:part name="sessionID" element="session:sessionID"/></wsdl:message>
4) In wsdl bindings, add this soap header declaration, both in
<wsdl:input> and <wsdl:output> of your operation:
<wsdlsoap:header message="impl:soapHeader" part="sessionID" use="literal"/>
As you can see, my Axis web service is doc/lit style.
I hope this can be useful for you, I'd like to know if it works.
Stefano
----- Original Message -----
From: "Dorner Thomas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 28, 2004 10:06 AM
Subject: AW: Session
Hello Stefano,
can u please explain me how you add the header in your wsdl?
Some tool or by hand?
Can you show me your wsdl for example?
And how can .Net use this header to make things work?
Thanks Tomi
-----Urspr�ngliche Nachricht-----
Von: Stefano Sambi [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 27. April 2004 18:58
An: [EMAIL PROTECTED]
Betreff: Re: Session
I didn't use cookies, but only a soap header with SimpleSessionHandler on
Axis side.
I also added an header in my wsdl, so .NET implements it automatically.
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 27, 2004 6:34 PM
Subject: Re: Session
I did not post any troubles as the need tapered off. But, I read in the
article: To do this from a client that uses the axis runtime, the client
has to call the setMaintainSession method of the
org.apache.axis.client.Service interface. This interface is implemented by
the Locator class generated by the WSDL2Java generation tool. Once you
call
the method, the Axis framework will automatically return the cookie to the
server:
The problem i ran in to was how to make the client make and send the
cookie. How did you do it in .NET if I may ask. The path I took, which
was not successful for me, was to add a header with the session id in the
header.
Thanks.
"Stefano Sambi"
<[EMAIL PROTECTED] To:
<[EMAIL PROTECTED]>
iness-e.it> cc:
Subject: Re: Session
04/27/2004 11:23
AM
Please respond to
axis-user
Hi,
I used sessions between an Axis web service and a .NET client.
I didn't read your past messages, so I don't know what is your problem.
Stefano
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 27, 2004 4:57 PM
Subject: Re: Session
I am curious to know if anyone has implemented sessions without using
the
axis client. It must be possible to interop w/ non java clients and use
sessions, but it has eluded me, so far.
samir_chouthai
<[EMAIL PROTECTED] To:
[EMAIL PROTECTED]
.com> cc:
Subject: Re: Session
04/27/2004 09:36
AM
Please respond to
axis-user
You can mantain sessions between the client and server ... take a look
at
how
org.apache.axis.handlers.SimpleSessionHandler works ...
here's an article describing sessions.
http://www.fawcette.com/javapro/2003_04/online/wsdl_kjones_04_29_03/default_
pf.aspx
Vineet Singh <[EMAIL PROTECTED]> wrote:
hi all
I need to implement the following case, need some help in what way that
can be done.
I want to check if the same client is firing the request or a different
client for a given web service.
if it is the same client how to identify it?
I want to keep most of the implementation on the server side.
Thanks
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
--
Srinivas Vemula +91 40 23547826- Ext 201
Associate Consultant +91 40 23541447 (Fax)
Mensamind +91 98497-42720 (Mobile)
Hyderabad
India
http://www.mensamind.com
DISCLAIMER
The information contained in this e-mail is confidential and intended for
the named recipient(s) only. If you are not an intended recipient of this
email you must not copy, distribute or take any further action in reliance
on it. You should delete it and notify the sender immediately.