I developed a WCF service with a custom UserNamePasswordValidator with basicHttpBinding using HTTPS. It works great with .Net client, using ClientCredentials to send username and password for authentication.
However, I need to call this from the Delphi XE client. How to send .Net equivalent of ClientCredentials using Delphi? Is it possible? If so, how? If this is not the case, are there any alternatives?
Tks
EDIT
Below is my client side code in .Net:
EndpointAddress oTransac = new EndpointAddress(GetAddress()); using (WebServiceClient oClient = new WebServiceClient ("httpbasic", oTransac)) { oClient.ClientCredentials.UserName.UserName = "username"; oClient.ClientCredentials.UserName.Password = "password"; oClient.DoStuff(); }
EDIT
I do some research and I was able to authenticate between Delphi and old asmx web services using SOAP Hearders. I found the article below. Can I achieve the same behavior of the old [WebMethod] [System.Web.Services.Protocols.SoapHeader("SoapHeader")] using the technique of the article?
http://weblogs.asp.net/paolopia/archive/2008/02/25/handling-custom-soap-headers-via-wcf-behaviors.aspx
EDIT BOUNTY
Received by marking as the correct response to generosity, I would like to be able to call the web service from Delphi using the WCF service UserNamePasswordValidator on the server side.
authentication delphi wcf soapheader
Pascal
source share