I'm using HTTP Header Basic authentication to send username and password to the server:
Code:
List<String> as = new ArrayList<String>();
HttpTransportProperties.Authenticator basicAuth = new HttpTransportProperties.Authenticator();
as.add(Authenticator.BASIC);
basicAuth.setAuthSchemes(as);
basicAuth.setUsername("ABC");
basicAuth.setPassword("password");
basicAuth.setPreemptiveAuthentication(true);
serviceStub._getServiceClient().getOptions().setProperty(
org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,
basicAuthenticator);
I'm using Tomcat 6 as a server.
In catalina.log file, I can see the following:
header=authorization=Basic U2hyZXlhczpwYXNzd29yZA==
I'm expecting "authorization" as "Authorization" i.e. Captial 'A' in authorization.
I've checked many existing post but not able to find the answer.
Could you please advice how to achieve above result?
Thanks in advance