(Tomcat) How to set username and password for SSL to avoid 401

Hello!

I try to access a webservices with SSL. Everything seems to be OK but I get a (401)Unauthorized response. My investigation has led to I suspect that the problem must be that I need to apply the correct username and password.

But what is the correct username and password????

I use Tomcat 5.5.9 and axis.

I have tried with:
user_name
user_pass

My_windows_XP_log_in_user_name
My_windows_XP_log_in_user_pass

keystorePass and the name set in the keystore

But no luck at all.

My code looks like:

SSLSoapWsdlServerServiceLocator sslSoapWsdlServerServiceLocator = new SSLSoapWsdlServerServiceLocator();
SSLSoapWsdlServerSoapBindingStub sslSoapWsdlServerSoapBindingStub = (SSLSoapWsdlServerSoapBindingStub) sslSoapWsdlServerServiceLocator.getSSLSoapWsdlServer(new URL("https://localhost:8443/axis/services/SSLSoapWsdlServer"));
sslSoapWsdlServerSoapBindingStub.setUsername("Frean");
sslSoapWsdlServerSoapBindingStub.setPassword("xxxxxx");
String returned = (String)sslSoapWsdlServerSoapBindingStub.getPrime("someString");
System.out.println( "Soap returned: " + returned );

I do not know where I find the username and password to use. I have not set anything like that in my Tomcat.

So if you know where to find or config this please let me know!!

Best regards
Fredrik

fredand44Asked:
Who is Participating?
 
suprapto45Connect With a Mentor Commented:
Hi,

Maybe you can try Tomcat admin username and password. If you do not have 'admin' role, you need to add it :).

http://www.jguru.com/faq/view.jsp?EID=1087957

Regards
Dave
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.