users@jax-rpc.java.net

RE: Question about security

From: Merten Schumann <Merten.Schumann_at_asg.com>
Date: Mon, 24 Oct 2005 14:01:14 +0200

Mariano,

do something like this in your server side

 // implement interface javax.xml.rpc.server.ServiceLifecycle
 public void init(final Object context) throws ServiceException
 {
  myServletEndpointContext=(ServletEndpointContext)context;
 }

and then use the context

   context.getUserPrincipal()

cu
   Merten

> -----Original Message-----
> From: Mariano Garcia [mailto:mgarcia_at_entel.es]
> Sent: Monday, October 24, 2005 1:53 PM
> To: Lists - jax-rpc
> Subject: Question about security
>
> Hi all,
>
> I have a problem with a webservice using jax-rpc. The server in which
> the webservice is going to be deployed needs a HTTP basic
> authentication
> (I mean, when I try to load a web page from that server, a
> dialog answer
> me to put a username and password).
>
> >From client side I use stub properties in order to authenticate:
>
> stub._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY, "username");
> stub._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY, "password");
>
> Is there any way to get this values from server side? I have tried to
> use ServiceLifecycle and ServletEndpointContext classes, but
> I don't how
> to use them correctly.
>
> Tips?