users@jax-rpc.java.net

RE: Accessing HTTP Session and Cookies in JAX-RPC client (JWSDP 1 .3)

From: Kresimir Kers (ZG/ETK) <"Kresimir>
Date: Mon, 13 Sep 2004 08:48:21 +0200

OK, then this is something that should be included in JAX-RPC, that is, some sort of access to underlying transport protocol whatever it is (HTTP, JMS, SMTP ...). I could see use cases for at least two of transport protocols: HTTP/S and JMS. In HTTP access to cookies that are not JSESSION cookie and perhaps to control HTTP redirection (I will explain it later) and in JMS to some custom message properties or REDELIVER flag ...

Here is explanation of HTTP redirect use case and problems regarding it. In cases when you are redirected from one URL to some other and if both URLs have the same protocol e.g. HTTP then all works fine. If redirection URL has different protocol then first URL e.g. first is HTTP and second HTTPS automatic redirection does not work (this is maybe a bug). Second problem in this use case is that underlying HTTP mechanism does not redirect to other URL with the same method (POST/GET) it always uses GET and this is problem. If I understand HTTP specification correct redirection should keep HTTP method so if we access some URL with POST method and it redirects us to other URL method should remain the same.

Another thing is HTTP/S in current implementation Java certificate keystore and pass for it are defined through Java system property so we must use the same keystore for all connections in that application and this is something that can cause problems because we might want to have different keystores for client connections and different for server certificates (security reasons). Access to underlying HTTPS protocol will solve this problem.



Kresimir Kers, B.Sc.E.E. & Comp.
System/Software Engineer Senior Specialist
E-Systems Department (ETK/OEP)
Ericsson Nikola Tesla d.d. Zagreb, Croatia
phone: +385 1 365 3911
mobile: +385 91 365 3911
fax: +385 1 365 3610
email: kresimir.kers_at_ericsson.com



> -----Original Message-----
> From: Kevin Jones [mailto:kevinj_at_develop.com]
> Sent: 11. rujan 2004 11:08
> To: users_at_jax-rpc.dev.java.net
> Subject: RE: Accessing HTTP Session and Cookies in JAX-RPC
> client (JWSDP
> 1.3)
>
>
> I'm not sure in the SI that there is any way of getting at
> the HTTP stream
> within the client,
>
> Kevin Jones
> http://kevinj.develop.com
>
> > -----Original Message-----
> > From: Kresimir Kers (ZG/ETK) [mailto:kresimir.kers_at_ericsson.com]
> > Sent: 09 September 2004 15:12
> > To: 'users_at_jax-rpc.dev.java.net'
> > Subject: RE: Accessing HTTP Session and Cookies in JAX-RPC
> > client (JWSDP 1.3)
> >
> > So if this is true how can I get cookies (and send them in
> > subsequent WS access) if those cookies are other than jsessionid.
> >
> >
> > Kreso
> >
> > > -----Original Message-----
> > > From: Kevin Jones [mailto:kevinj_at_develop.com]
> > > Sent: 06. kolovoz 2004 11:17
> > > To: users_at_jax-rpc.dev.java.net
> > > Subject: RE: Accessing HTTP Session and Cookies in JAX-RPC client
> > > (JWSDP
> > > 1.3)
> > >
> > >
> > > If you are using HttpSession then the cookie sent is called
> > jsessionid
> > > and this is handled by the stub directly (if you set the
> > > SESSION_MAINTAIN_PROPERTY property). However for other
> > cookies you are
> > > on your own. I'm not sure there's anyway to get at the HTTP
> > connection
> > > from the generated stubs, unless Bobby or one of the other
> > folks knows
> > > differently?
> > >
> > > Kevin Jones
> > > http://kevinj.develop.com
> > >
> > >
> > > > -----Original Message-----
> > > > From: Merten Schumann [mailto:Merten.Schumann_at_asg.com]
> > > > Sent: 05 August 2004 07:22
> > > > To: users_at_jax-rpc.dev.java.net
> > > > Subject: RE: Accessing HTTP Session and Cookies in
> JAX-RPC client
> > > > (JWSDP 1.3)
> > > >
> > > > Hm, shouldn't the cookies get handled automatically
> when you use
> > > > HTTP Sessions?
> > > >
> > > > How do you set the cookie on the WS server side? You
> have to call
> > > > <ServletEndpointContext> .getHTTPSession() to use HTTP
> > Sessions at
> > > > all ...
> > > > Merten
> > > >
> > > > > -----Original Message-----
> > > > > From: Kresimir Kers (ZG/ETK)
> [mailto:kresimir.kers_at_ericsson.com]
> > > > > Sent: Wednesday, August 04, 2004 10:06 AM
> > > > > To: 'users_at_jax-rpc.dev.java.net'
> > > > > Subject: Accessing HTTP Session and Cookies in JAX-RPC
> > > > client (JWSDP
> > > > > 1.3)
> > > > >
> > > > > Hello,
> > > > >
> > > > > is it possible to get Cookie from response in JAX-RPC
> > > > client and how
> > > > > to do it.
> > > > > I have situation where WS Server set some cookie in HTTP
> > > > response that
> > > > > caries WS response that I need to obtain in client and
> > store for
> > > > > subsequent calls to WS. Setting of
> > > > SESSION_MAINTAIN_PROPERTY in Stub
> > > > > class does not solve my issue. Of course I also need to
> > set that
> > > > > stored cookie to the HTTP call in next call to WS.
> > > > >
> > > > > Thanx,
> > > > >
> > > > > Kreso
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> > > > > For additional commands, e-mail:
> users-help_at_jax-rpc.dev.java.net
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> > > > For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
> > > >
> > > >
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> > > For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> > For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net