Dears,
i have a WCF service and i want to consume it using "Web Service Consumers" from domino designer using the WSDL.
The WCF use the security token for authentication, when I call it from a .net client it works properly.
when I call it using the domino "Web Service consumer" it return the below error:
"The Web Service IService1_n0 method "Method name" has returned a fault"
the generated code for initializing the service is:
Call Service.Initialize ("HttpTempuriOrgService1", _
"Service1.BasicHttpBinding_IService1", "http://localhost:20387/Service1.svc", _
"IService1_n0")
how can i initialize the service with the security token like the .net client that add the token to the header message when consuming the WCF service?
Below is a sample of the key we are sending from .net application
public Service1Client()
{
string apiKey = ConfigurationManager.AppSettings["apiKey"].ToString();
// send api key in request header
AddCustomHeaderUserInformation(
new OperationContextScope(base.InnerChannel), apiKey);
}
private void AddCustomHeaderUserInformation(
OperationContextScope scope, string apiKey)
{
//Add the basic apiKey
MessageHeader<string> customHeaderUserID =
new MessageHeader<string>(apiKey);
MessageHeader untypedHeaderUserID =
customHeaderUserID.GetUntypedHeader("UserID",
"CustomHeader");
OperationContext.Current.OutgoingMessageHeaders.Add(untypedHeaderUserID);
}
Thank you