Re: Web service client authentication

2007-02-18 Thread Derek Weeks

Thanks Jarek,

The key line I was missing was:
auth.setPreemptiveAuthentication(true);

It wasn't necessary for me to use auth.setAuthSchemes() because Axis
determined that it needed to use basic authentication on its own.

Thanks for your help,

Derek

On 16/02/07, Jarek Kucypera <[EMAIL PROTECTED]> wrote:

Derek Weeks wrote:

> This constant does not appear to exist in Axis2 version 1.1 or 1.1.1.
> Should the
> constant be one of these?

Following  is how it works for me with axis2 1.1.1

HttpTransportProperties.Authenticator auth = new
HttpTransportProperties.Authenticator();
auth.setPreemptiveAuthentication(true);
auth.setAuthSchemes(Arrays.asList(new
String[]{HttpTransportProperties.Authenticator.BASIC}));
auth.setUsername("test_user");
auth.setPassword("test_password");
stub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,auth);

J.K.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Web service client authentication

2007-02-15 Thread Derek Weeks

Hi Axis2 users,

I'm writing a web service client that needs to authenticate against
the HTTP server.

The example of how to do this in the Transports section of the
documentation says to add an HttpTransportProperties.Authenticator
object to the Options object using the key
org.apache.axis2.transport.http.HTTPConstants.BASIC_AUTHENTICATE.

This constant does not appear to exist in Axis2 version 1.1 or 1.1.1. Should the
constant be one of these?
HTTPConstants.AUTHENTICATE
HttpTransportProperties.Authenticator.BASIC

Cheers,

Derek

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]