Just nu i M3-nätverket
Jump to content

How to set username and password for SSL to avoid 401


fredand

Recommended Posts

Hello!

 

I use Tomcat 5.5.9 and axis.

 

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 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"'>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.

 

When I try to access the web service with a browser like:

https://localhost:8443/axis/services/SSLSoapWsdlServer

I get:

http://www.dsv.su.se/~fr-ander/loginpopup.JPG

 

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

 

Best regards

Fredrik

 

 

 

Link to comment
Share on other sites

Hej!

 

Tack för svaret, jag har ställt samma fråga på flera forum och tänkte att det spelar nog ingen roll. Engelska är ju ganska gångbart överallt, samt att det blir ju enklet att klippa in frågan på flera ställen.

 

Har du någon ide om vad problemet kan vara?

 

Mvh

Fredrik

 

Link to comment
Share on other sites

Nope

 

Jag är bara lite "polis" ;)

 

Jovisst förstår de flesta engelska. Men det hade kanske varit mer normalt med svenska. Det är lättare att söka i forumet om man håller sig till svenska

 

--

[Esc]

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...