Question

1
Replies
904
Views
Close popover
PARAMESWARA REDDY KONUGANTI (ParamKonuganti)
1986

1986
US
ParamKonuganti Member since 2015 4 posts
1986
Posted: August 7, 2018
Last activity: August 8, 2018
Closed

How to send the basic authentication credentials of a Soap Service in ServiceClient Component

Hi All,

I want to send the credentials of a SOAP Service which uses a basic authentication(username & password) using serviceClient component.

Below article clearly explains how we can pass the authorization credentials,

article link

Once we have the object of the serviceClient, I hope we can use below snippet to convert the username and password into base64 and send in authorization header.

if (PreAuthenticate)
{
NetworkCredential networkCredentials =
Credentials.GetCredential(uri, "Basic");
if (networkCredentials != null)
{
byte[] credentialBuffer = new UTF8Encoding().GetBytes(
networkCredentials.UserName + ":" +
networkCredentials.Password);
request.Headers["Authorization"] =
"Basic " + Convert.ToBase64String(credentialBuffer);
}
else
{
throw new ApplicationException("No network credentials");
}
}

can anyone please advise me how to get the object of serviceClient and use it script component.

Robotic Process Automation
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.