none
SOAPMessage Exception -- WSE011: The input was not a valid SOAP message because the following header was not understood:Secuirty RRS feed

  • Question

  • Hi,

    I am trying to consume CSF Webservice in a ASP.Net website.

     

    For this i placed the following two uris in web.config which i am using as the participants of session.

     

    <add key="CSFServiceHost" value="Hst-pcs-3201"/>

    <add key="CSFServiceUri" value="http://localhost/DemoWebService/DemoService.ashx"/>

    <add key="ClientUri" value="soap.tcp://localhost:8080/ConsumeCSFService"/>

    <add key="ClientHost" value="Hst-pcs-3201"/>

     

    Please check the value of "ClientUri" i am using here is correct or not. "ConsumeCSFService" is my website name which is in my local webserver.

     

    I am getting the following error in CreateSession() method at the below statement.

    CSFSession.CreateSessionResponse response =

    sender.SendSync<CSFSession.CreateSessionResponse>(message);

     

    Microsoft.ConnectedServices.Sdk.Messaging.SoapFaultException: WSE011: The input was not a valid SOAP message because the following header was not understood: Security.

       at Microsoft.ConnectedServices.Sdk.Client.MessageSender.SendSync[TResponse](Message message, String defaultNamespace)

       at Microsoft.ConnectedServices.Sdk.Client.MessageSender.SendSync[TResponse](Message message)

     

    The important code in CreateSession() method:

    // Provide parameters for creating a new session.

    CSFSession.CreateSessionRequest request =

    new CSFSession.CreateSessionRequest(manifest);

    CSFSDK.Message message = CSFSDK.Message.CreateMessage(

    CSFSession.SessionActions.CreateRequest,

    new Uri(sessionManagerAdminUri));

    message.Header.Addressing.From =

    new CSFAddressing.EndpointReference(new Uri(CSFServiceUri));

    message.Body = request;

    message.Header.Security.Add(

    new CSFSecurity.UsernameToken("domain\\username", "Password",

    CSFSecurity.PasswordOption.SendPlainText));

    // Send the CreateSessionRequest message synchronously.

    CSFClient.MessageSender sender = new CSFClient.MessageSender();

    CSFSession.CreateSessionResponse response =

    sender.SendSync<CSFSession.CreateSessionResponse>(message);

     

     

    Please help me to rectify this error.

     

    Thanks

    Srinivas

    Monday, April 9, 2007 4:26 AM