This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


May 8, 2015, 2:37 PM
2 Posts

Consume WCF service with security token

  • Category: Domino Designer
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags: web services,WCF services
  • Replies: 0

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


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal