cookies and webservice

2011-01-19 Thread Diego Monni
Hi,
I have to use a webservice (tomcat 7.0.0. + axis2 1.5 + jdk 6.0.21)
installed in load balancing configuration. I need implement session affinity
but in the response there isn't the jsessionid. In the application context
the flag  cookies is set to true and when I browse the application page the
jsessionid works fine.
What is wrong?

Thanks in advance

diego


RE: cookies and webservice

2011-01-19 Thread Caldarale, Charles R
 From: Diego Monni [mailto:diego.mo...@gmail.com] 
 Subject: cookies and webservice

 I have to use a webservice (tomcat 7.0.0. + axis2 1.5 + jdk 6.0.21)

Try it again on a stable version of Tomcat (7.0.6).

 but in the response there isn't the jsessionid. In the application context
 the flag cookies is set to true and when I browse the application page the
 jsessionid works fine.

Your statements are contradictory: first you say jsessionid isn't in the 
response, then you say it works fine.  What should we believe?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: cookies and webservice

2011-01-19 Thread Diego Monni
Thanks for the response.
I mean that my application contains jsp pages and webservices. When I call a
jsp page the jsessionid is present. When I invoke a service method in the
response header jsessionid is not present.

diego

2011/1/19 Caldarale, Charles R chuck.caldar...@unisys.com

  From: Diego Monni [mailto:diego.mo...@gmail.com]
  Subject: cookies and webservice

  I have to use a webservice (tomcat 7.0.0. + axis2 1.5 + jdk 6.0.21)

 Try it again on a stable version of Tomcat (7.0.6).

  but in the response there isn't the jsessionid. In the application
 context
  the flag cookies is set to true and when I browse the application page
 the
  jsessionid works fine.

 Your statements are contradictory: first you say jsessionid isn't in the
 response, then you say it works fine.  What should we believe?

  - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you received
 this in error, please contact the sender and delete the e-mail and its
 attachments from all computers.


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: cookies and webservice

2011-01-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Diego,

On 1/19/2011 9:48 AM, Diego Monni wrote:
 Thanks for the response.
 I mean that my application contains jsp pages and webservices. When I call a
 jsp page the jsessionid is present. When I invoke a service method in the
 response header jsessionid is not present.

How are you checking for the response header?

Is your web service client authenticating with the server? If a session
isn't created, then a cookie will never be returned. A session will be
created if you use FORM authentication or if your code explicitly
creates a session.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk03FpsACgkQ9CaO5/Lv0PCrPgCggPmyCzwBKjkgvT/cyMDLMnVw
D1IAoKb+OcFyZRgISMwrN54PJyA553ln
=ELsa
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: cookies and webservice

2011-01-19 Thread Diego Monni
I use whireshark in order to snif the transaction because de the proxy class
return null

MessageContext inMsgCtx1 =
stub1._getServiceClient().getLastOperationContext().getMessageContexts().get(Out);
String incomingCookie1 =
(String)inMsgCtx.getServiceContext().getProperty(HTTPConstants.COOKIE_STRING);

The web service client use an application authentication (service with login
method) and it doesn't perform any other autentication.

diego

2011/1/19 Christopher Schultz ch...@christopherschultz.net

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Diego,

 On 1/19/2011 9:48 AM, Diego Monni wrote:
  Thanks for the response.
  I mean that my application contains jsp pages and webservices. When I
 call a
  jsp page the jsessionid is present. When I invoke a service method in the
  response header jsessionid is not present.

 How are you checking for the response header?

 Is your web service client authenticating with the server? If a session
 isn't created, then a cookie will never be returned. A session will be
 created if you use FORM authentication or if your code explicitly
 creates a session.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAk03FpsACgkQ9CaO5/Lv0PCrPgCggPmyCzwBKjkgvT/cyMDLMnVw
 D1IAoKb+OcFyZRgISMwrN54PJyA553ln
 =ELsa
 -END PGP SIGNATURE-

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: cookies and webservice

2011-01-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Diego,

On 1/19/2011 12:08 PM, Diego Monni wrote:
 MessageContext inMsgCtx1 =
 stub1._getServiceClient().getLastOperationContext().getMessageContexts().get(Out);
 String incomingCookie1 =
 (String)inMsgCtx.getServiceContext().getProperty(HTTPConstants.COOKIE_STRING);

So, what is the value of HTTPConstants.COOKIE_STRING?

I guess it doesn't matter since you are using Wireshark and aren't
seeing the header you want, anyway.

 The web service client use an application authentication (service with login
 method) and it doesn't perform any other autentication.

The only thing I can think of is that the server isn't creating a
session and therefore no session identifier is being returned to the client.

Are you sure a session is being created? If so, how do you know?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk03ZKgACgkQ9CaO5/Lv0PBIkwCeMzj3fuA/srufD8w9lDhMComM
ie8AnjwolCL8EJTEyXq5q18SWNQ3JJlP
=l/oF
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org