Greetings all. I'm using Axis 1.4 but have the option of moving to
axis2 if I have to in order to achieve my goal. I've got an eclipse
plugin that makes webservice calls; it currently uses the stubs
generated with wsdl2java.

the URL for the service could be a local machine without any
authentication, or it could be some other machine that uses an
authentication mechanism (basic, NTLM, etc). for the local stuff,
everything works fine. But when I try to hit the service on a server
requiring authentication it fails, naturally.

My specific question is: with axis 1.4, is there a generic way of
working with the various different authentication mechanisms if all I
know is the username and password? For example, I understand that this
is fairly easy with httpclient using something along these lines:

if(!authMethod.equals("no_auth")){
        List authPrefs = new ArrayList(3);
        authPrefs.add(AuthPolicy.DIGEST);
        authPrefs.add(AuthPolicy.BASIC);
        authPrefs.add(AuthPolicy.NTLM);

this.client.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY,
authPrefs);
        this.client.getState().setCredentials(AuthScope.ANY, new
UsernamePasswordCredentials(username, password));
        this.doAuthentication = true;
 }

Can I achieve this same kind of generic coding using Axis 1.4?  IF
not, can I achieve it (or something similar) with Axis2?

Mainly, I want to minimize the data i need to collect inside the
eclipse plugin... I don't want to ask the user what type of
authentication method is being used, for example. Just get the
username and password and have the service engine figure it out.

Please forgive if this is a n00b question... I'm not too familiar with
coding to authentication schemes.

Thanks in advance.

Marc

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

Reply via email to