users@jax-rpc.java.net

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

From: trebor iksrazal <iksrazal_at_yahoo.com>
Date: Wed, 15 Jun 2005 04:45:20 -0700 (PDT)

You want to maintain a session, for example log on
only once? The way that is most documented requires
EJB and Stateful session beans - every app server
supports it and has plenty of docs showing how. I do
it via JBoss, returning a SOAP session id on login and
passing that back in on subsequent requests. It can
expire and works similair to cookies in this context.

Note that JBoss uses Axis as its internal SOAP engine,
and in this case I use JWSDP style SOAP complex
objects, wscompile etc. the Clients are Java via a
Hybrid Axis/JWSDP (Axis deserialization)
implementation, Flash and Delphi. A pure Axis
implementation would would work fine too.

As for a pure HTTP Session solution, the question pops
up frequently yet I've yet to see it done - although I
am interested.

HTH,
iksrazal

--- Merten Schumann <Merten.Schumann_at_asg.com> 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
>
>



                
__________________________________
Discover Yahoo!
Find restaurants, movies, travel and more fun for the weekend. Check it out!
http://discover.yahoo.com/weekend.html