I'm trying to use your SessionHandler to manage session between C# client and Axis web service but I do not succeed to set the SOAP header in my wsdl. Can you send me an example of your wsdl? And also how do you manage sessions in your C# client?
Here it's my changes to wsdl that don't work: I added the definition of sessionID element in 'Types' section: <wsdl:types> <xsd:schema targetNamespace=http://localhost/axis/services/MyService> <xsd:complexType name="Session"> <xsd:sequence> <xsd:element name="sessionID"> <xsd:complexType> <xsd:sequence> <xsd:element name="ID" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:schema> </wsdl:types> I added the definition of soap header message in 'Messages' section: <wsdl:message name="soapHeader"> <wsdl:part name="SessionID" type="impl:Session" xmlns:impl=http://localhost/axis/services/MyService/> </wsdl:message> and I added the soap header binding to my operation in 'Binding' section: <wsdlsoap:header message="impl:soapHeader" part="SessionID" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> Thanks Stefano ----- Original Message ----- From: "Abhinav Maheshwari" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 16, 2004 3:15 PM Subject: RE: C# Cllient , Axis Server, Session Management > Hi Srinivas, > You need to use the SessionHandler to maintain session information but there > are problems with using the one supplied with Axis. This is a modified > version of the SessionHandler supplied with Axis which can be used. > > Also, you need to manually put the SOAP Header in the WSDL generated by Axis > so that Visual Studio can generate the code for session variables. > > Regards, > Abhinav > > -----Original Message----- > From: Srinivas Vemula [mailto:[EMAIL PROTECTED] > Sent: Monday, February 16, 2004 6:30 PM > To: [EMAIL PROTECTED] > Subject: C# Cllient , Axis Server, Session Management > > > Hi All, > I am new to using axis. We are trying to communciate from a .NET > C# client. Can any one let me know, how to track sessions in this > scenario? Basically, we would like to put some authorization info in a > session object as the first call from the client will be for authentication. > After that client will call other Axis (web) services for executing > some more tasks. We would like to check for the authorization > information for subsequent calls from the same client and deny services > if we dont find the relevant information in the session object . > Any help or pointers to solve this? Thank you all for your help and > time. > srini > > -- > 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. >
