cancel
Showing results for 
Search instead for 
Did you mean: 

Authentication on Web Service

Former Member
0 Kudos

Hi,

I would like to know how includes the params for authentication in WSDL.

I did a example, but i had to fill user and password on box of authentication of the Internet Explorer when Web Service went executed and our costumer don't want to inform to yours users this user and password.

Thanks.

Regards,

Bruno

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You could use Single Sign On where it will never prompt the user to enter user name or password and also as suggested in the previous post you could use some default name and password so that all users can use the webservice...

Thanks..

Preetham S

Former Member
0 Kudos

Jo,

I already tried put this tags in soap, but didn't work. Any more idea?

Preetham,

We are calling Web Service by Java Class... I'm using HttpURLConnection... When i run Java Programm, occurs a 401 error. Is there a restriction with HttpURLConnection?

Thanks for your help.

Regards,

Bruno

Former Member
0 Kudos

can you try:

URLConnection uc= url.openConnection();
uc.setRequestProperty("Authorization", "Basic " + Base64.encode(username + ":" + password));

jo

Former Member
0 Kudos

Hi Jo,

I got to connect on Web Service using your code.

Thanks for your help.

Regards,

Bruno

Answers (1)

Answers (1)

Former Member
0 Kudos

hi bruno,

you can try setting the credentials on the soap header.


<SOAP-ENV:Header>
<tns:UserCredentials xmlns:tns="http://xxxx.com/xxxService/">
<tns:UserName>userName</tns:UserName>
<tns:Password>userPwd</tns:Password>
</tns:UserCredentials>
</SOAP-ENV:Header>

im not sure if this would work on your case, but might worth a try.

regards

jo