Good question J

What is the client side you are using? .NET? Axis? Something else?

For sure, the SessionHandler used on the server side must be updated if you change this namespace, but I do not recall that the .NET client (what I used at the time) required a different namespace (also I might be wrong).

 

Thomas

 

-----Original Message-----
From: Sateesh Ayyagari [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 10:48 PM
To: [EMAIL PROTECTED]
Subject: RE: Maintain Session with .NET and AXIS

 

Hi Thomas,

  I have a question about the MyService.wsdl which you used for customizing in the header-based session maintainance.  Is it mandatory to declare the schema of the complexType "SessionID" to be of a different targetNamespace?  I tried declaring the same targetNamespace as that of the web service and it doesnt work, i.e., proxy doesnt form on the client side.  Could you kindly explain about it.

Thanks,

Sateesh.

 [EMAIL PROTECTED] wrote:

I have no experience with server side .NET Web Service, so there is not that much I can do to help.

The only thing I can advise you to do (if not already done as I suspect by reading your message) is to use the tcp monitor of Axis to see what is exchanged between your server and your client. Look at the HTTP header and check for the cookie related ones. At least it will tell you if the HTTP cookies handling is done properly. If it is, the next step is do debug server and/or client side, I suppose .....

Sorry I can not help more than that.

 

Thomas

 

-----Original Message-----
From: Sateesh Ayyagari [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 15, 2003 12:06 AM
To: [EMAIL PROTECTED]
Subject: RE: Maintain Session with .NET and AXIS

 

Hi Thomas,

   I am first working on the Cookie-based session maintainance.  I could get it to work with the .NET client and a Java Web Service.  But I have problem to get the Java client and the .NET Web Service to work.  I ran the WSDL2Java to get the stubs and tried to modify the code in the stub.  My simple .NET web service has a setNumber and a getNumber as web methods.  The modification I did to the stub is to use a single "Call" object reference to both the set and get web methods and did a call.setMaintainSession(true), when I am calling the set method and used the same call for get.  Interestingly the SOAP request for the get method is using the same session id which was set during the SOAP response of the set method, but my value is displayed as "0" irrespective of what number I set.  Could you give me some hints as to why it is doing like this.  If the above method is incorrect, could you kindly suggest a better one.

Sateesh.

 [EMAIL PROTECTED] wrote:

I will need to get back to the code that I have to make it work with the latest Axis version, but here is the modification that I did to the SimpleSessionHandler.java to wrapped the session id into a type. I recall (it was a while ago), that this is all I had to do (beside adding it to the Axis handler chain of course), to have it handled completely transparently in the code generated by VS Studio .NET C# when importing my web service reference. Actually there was something else to do: customize the service WSDL to contain the right SOAP header definition.

You can find enclosed the modified (and renamed) SimpleSessionHandler and the WSDL to give you and idea of what I did.

Sorry I can not give more details than that as I did that some times ago.

 

Thomas

 

 

-----Original Message-----
From: Jindal, Ashwini [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 12:28 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Maintain Session with .NET and AXIS

 

Hello Thomas,

 

I have a very similar problem that I am currently working with. I am wondering if you have the code for the following solution that you suggested and if you can share the same.

 

Ashwini

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 10:11 PM
To: [EMAIL PROTECTED]
Subject: RE: Maintain Session with .NET and AXIS

With cookies, the session id is sent between the client and the server in the HTTP headers, meaning that it is bound to the transport protocol. Change the protocol (for example, use JMS) and it does not work anymore.

If you look at the SOAP specification (from w3c.org), a SOAP message is composed of a SOAP body (the content of the message) but also of SOAP Headers which can be used for session management (for example) in a transport independent way. In simple term, what you put in the http header when using cookies, you now put it in the SOAP header.

Yes, it means a little more programming on your side as SOAP tools (client and server) do not necessarily handle SOAP headers in a complete transparent manner but it might be worth paying the cost if you are considering using other transport that just HTTP.

Take a look at org/apache/axis/handlers/SimpleSessionHandler.java which is a very good start to do SOAP header based session handling (for simple session handling, it can be used as is). The last time I played with that I had to slightly modify it to wrap the sessionID into a complex type so a C# .NET client can handle it in a complete transparent manner.

 

Thomas

 

-----Original Message-----
From: Sateesh Ayyagari [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 1:30 PM
To: [EMAIL PROTECTED]
Subject: RE: Maintain Session with .NET and AXIS

 

Hi Thomas,

   I read the mailing list and found your reply to "Stateful Web Services" stating that the SOAP header solution to maintaining state would be the right approach rather than the Cookie-based approach.  I could maintain session and application scope using the HTTP cookies set on the client side and session/application scope on the server side.  Could you kindly explain in detail the Header-based approach?

Sateesh.

 [EMAIL PROTECTED] wrote:

If you are using Axis for your web service, setting the scope to session will turn cookie handling on from the server side point of view (Axis will use the HTTPSession features of the servlet container). On the C# client side, you have to create the cookie container for your service object to turn cookie on as well, and that is it, no need for anything else.

If you do a couple of searches in the mailing list archive you will find more details on all that for sure.

 

Thomas

 

-----Original Message-----
From: Sateesh Ayyagari [mailto:[EMAIL PROTECTED]
Sent: Monday, February 10, 2003 1:57 PM
To: [EMAIL PROTECTED]
Subject: Maintain Session with .NET and AXIS

 

Hi,

   I have a question regarding maintaining session.  How do we maintain session for a Java Web Service which is consumed by a C# client?  Any links would be appreciated.

Sateesh.

 


Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

 


Do you Yahoo!?
Yahoo! Web Hosting - establish your business online

> ATTACHMENT part 2 application/octet-stream name=SessionHandler.java > ATTACHMENT part 3 application/octet-stream name=MyService.wsdl

 


Do you Yahoo!?
Yahoo! Web Hosting - establish your business online

 


Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!

Reply via email to