users@jax-rpc.java.net

Re: Sun JAX-RPC client against Axis JAX-RPC web service - problem with HttpSession

From: Merten Schumann <Merten.Schumann_at_asg.com>
Date: Wed, 22 Jun 2005 11:19:14 +0200

Hello,

maybe it's a problem with cookie processing? I found in the Axis mailing
list the message below ...
Just got my Python (SOAPpy) client running fine with HttpSession
support, after applying a patch for cookie support
(http://sourceforge.net/mailarchive/message.php?msg_id=12035895).

So, could it be that Sun JAX-RPC doesn't understand Axis cookies
correctly or so? I'll check if I could change the way Axis generates
cookies ... And I still need to test my service when deployed to Sun AS
instead of Tomcat/Axis.
   Merten

> -----Original Message-----
> From: Gerry Gao
> Sent: Saturday, June 18, 2005 4:59 AM
> To: axis-user_at_ws.apache.org
> Subject: Tip for cookie in AXIS 1.2.1
>
> Hi guys,
>
> Here is tip for you who use cookie in AXIS.
>
> Axis 1.2.1 has a simple cookie mechanism (compare to RFC2965)
> which already supports multiple cookies. As far as I know,
> there is still a cookie compatible problem. The HTTPSender
> and CommonsHTTPSender send multiple cookies in this format:
> Cookie: a=a1
> Cookie: b=b2
> Cookie: c=c3
> or
> Cookie2: a=a1
> Cookie2: b=b2
> Cookie2: c=c3
>
> But according to RFC2965, the multiple cookies should be sent
> to server in this format:
> Cookie: a=a1;b=b2;c=c3
>
> I think most of HTTP server can handle both formats, but some
> does not. (My http server + siteminder do not support the
> first format.)
>
> Fortunately, commons-httpclient has a parameter to help us
> with the latter format. Use this:
> DefaultHttpParams.getDefaultParams().setBooleanParameter(
> HttpMethodParams.SINGLE_COOKIE_HEADER,
> true);
> will force httpclient baking the multiple cookies into a
> single cookie header.
>
> Reference:
> http://htmlunit.sourceforge.net/phpwiki/index.php/SingleCookieHeader
>
> Gerry
>

> -----Original Message-----
> From: Merten Schumann [mailto:Merten.Schumann_at_asg.com]
> Sent: Wednesday, June 15, 2005 4:47 PM
> To: users_at_jax-rpc.dev.java.net
> Subject: Re: Sun JAX-RPC client against Axis JAX-RPC web
> service - problem with HttpSession
>
> Doug,
>
> yes, my Perl client utilizing SOAP::Lite and HTTP::Cookies works fine,
> if I enable the cookie support
>
> $service->proxy('http://fake/', cookie_jar =>
> HTTP::Cookies->new(ignore_discard => 1));
>
> I'll try JAX-RPC client against Sun AS (instead of Axis in
> Tomcat) later
> the day ...
>
> cu
> Merten
>
> > -----Original Message-----
> > From: Doug Kohlert [mailto:Doug.Kohlert_at_Sun.COM]
> > Sent: Wednesday, June 15, 2005 4:25 PM
> > To: users_at_jax-rpc.dev.java.net
> > Subject: Re: Sun JAX-RPC client against Axis JAX-RPC web
> > service - problem with HttpSession
> >
> > Merten,
> > Does a PERL client work with a JAX-RPC server?
> >
> > Merten Schumann wrote:
> >
> > >Hello,
> > >
> > >I think questions regarding maintaining HTTP sessions are
> > too much out
> > >there, anyway, I could not find any detailed information about how
> > >things are in Axis 1.2 (server) and JAX-RPC (client) ...
> > Asked in Axis
> > >mailing list first but got no response there ...
> > >
> > >My problem is as simple as this: I've got a JAX-RPC web
> > service up and
> > >running smoothly in Axis (I do use the approach "add Axis
> to your web
> > >app", if this is of interest). I do deploy my service with
> > scope=session
> > >(I even tried application). My clients (Sun JAX-RPC, PHP,
> > Perl ...) work
> > >fine so far (with the Axis global configuration switch
> > dotNetSoapEncFix
> > >set to true BTW).
> > >
> > >Now I tried for some reason to use
> javax.servlet.http.HttpSession. I
> > >think I did the required steps in the server side: implement
> > >javax.xml.rpc.server.ServiceLifecycle, store in init()
> > (get's called, as
> > >expected) the javax.xml.rpc.server.ServletEndpointContext and call
> > >context.getHttpSession(). In the client, I do
> > >proxy.setProperty(javax.xml.rpc.Stub.SESSION_MAINTAIN_PROPERTY,
> > >Boolean.TRUE).
> > >
> > >Well, and it does not work. :-( In the web service server
> side, I can
> > >see that each time I do call context.getHttpSession()
> another object
> > >get's returned.
> > >
> > >So, I guess the exchange of cookies is not working
> correctly between
> > >Axis 1.2 and Sun JAX-RPC (from J2EE 1.4) ... Anyone else
> experiencing
> > >this issue? Or anyone has got this combination running
> > without problems?
> > >Anyone has a solution?
> > >
> > >My Perl (SOAP::Lite) client works fine against Axis when
> > cookie support
> > >is enabled! So, who's wrong here, Apache or Sun? :-)
> > >
> > >Thanx alot
> > > Merten
> > >
> >
> >---------------------------------------------------------------------
> > >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
> > >
> > >
> > >
> >
> > --
> > - Doug
> >
> >
> >
> ---------------------------------------------------------------------
> > 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
>
>