axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Upul Godage" <upulg....@gmail.com>
Subject Re: wsdl2java with Basic Authentication
Date Fri, 05 Oct 2007 16:57:31 GMT
Hi Quino,

You can try giving username and password in the url.

./wsdljava.sh -uri http://username:password@host:port/path/service?WSDL


Upul



On 10/5/07, Leo Stevens <quino1@gmail.com> wrote:
>
> Thanks Upul....
> but my problem is that I can´t generate the clases because the wsdl2java
> throws an exception because the server need user and password and I can´t
> give it. when wsdl2java.class invoke the server.
>
> Thanks again.
> Quino.
>
>
>
> On 10/1/07, Upul Godage <upulg.dev@gmail.com> wrote:
> >
> > After you generate the classes, you can do something like this when
> > using the stub.
> >
> > HttpTransportProperties.Authenticator authenticator = new
> > HttpTransportProperties.Authenticator();
> > authenticator.setPreemptiveAuthentication (true);
> > authenticator.setAuthSchemes(Arrays.asList(new String[]{
> > HttpTransportProperties.Authenticator.BASIC}));
> > authenticator.setUsername(username);
> > authenticator.setPassword(password);
> > stub._getServiceClient().getOptions().setProperty(
> > HTTPConstants.AUTHENTICATE,authenticator);
> >
> > Upul
> >
> >
> > On 10/2/07, Leo Stevens <quino1@gmail.com> wrote:
> > >
> > > Hi !
> > > I have to invok a ws with Basic Authentication (user and pass), but
> > > first I need to create the java classes so I need run WSDL2JAVA.classwith user
and pass, so my question:  Is it posible to set a java env param
> > > with username and password.
> > >
> > > Thanks .
> > > Quino.
> > >
> >
> >
>

Mime
View raw message