2

Hope somebody can help me out.

I am trying to call this Web Service
https://link.hertz.com/AuthenticationWebservice/authenticateAdmin?wsdl

I have been said that I need to pass the following info for authentication with the web service:

username => "webServiceUserName" password => "webServicePassword" WSS-Password Type => "PasswordDigest" 

I am using an asp.net 4.0 application and unable to figure out how to pass WSS-Password type to my web service call.

I have added this service url as a Service reference in my asp.net application and I am using the following code in my asp.net page:

service1.AuthenticateAdminClient myClient = new service1.AuthenticateAdminClient(); myClient.ClientCredentials.UserName.UserName = "webServiceUserName"; wsClient.ClientCredentials.UserName.Password = "webServicePassword"; myClient.authenticateAdminCredentials(myUserName, myPassword, myDomain); 

thanks in advance,

Hari

1 Answer 1

2

We used this example and it works for us. We just changed for "genericity" this one in SecurityHeader:

 if (PasswordType == PasswordType.Digest) { writer.WriteAttributeString("Type", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest"); writer.WriteString(ComputePasswordDigest(SystemPassword, nonce, created)); } else if (PasswordType == PasswordType.Text) { writer.WriteAttributeString("Type", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"); writer.WriteString(SystemPassword); } 
Sign up to request clarification or add additional context in comments.

1 Comment

hi,first of all, thanks for the reply. I made changes in my code to include your suggestion; but i am getting the exception: <br><br>An error was discovered processing the <wsse:Security> header.<br> Not sure, wot to do now?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.