axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Dodier <robert.dod...@gmail.com>
Subject Having trouble submitting credentials for Basic authentication
Date Fri, 26 Jul 2013 03:39:37 GMT
Hello,

I am working with Axis2 1.6.1 and I have a web service
client which was generated via wsdl2java.sh.

Here's the code I've added to assign the username and password:

        HttpTransportProperties.Authenticator A = new
HttpTransportProperties.Authenticator ();
        A.setUsername ("myusername");
        A.setPassword ("mypassword");

        _serviceClient.getOptions ().setProperty
(HTTPConstants.AUTHENTICATE, A);

The server wants Basic authentication, which seems to
be submitted successfully, but the server still returns 401 --
unauthorized after the client responds to the authentication
challenge. Can anyone tell what is going on?

Here is a link to the relevant bits of the log file:
http://pastebin.com/wG80PS7k
I see that the client first POSTs without authentication which is
rejected by the server, as expected, and then the client POSTs
again with Basic authentication. But that second attempt fails
too. The return code is 401 and the accompanying error message
sent by the server says "100 - System Error occured".

I guess it's possible I've gotten the user name & password wrong --
should I expect a more informative error message? or not?

Thanks for any light you can shed on this problem.

Robert Dodier

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Mime
View raw message