Why do I receive a Soap response namespace error

Viewed 50

I'm consuming a SOAP webservice made by an external party. Using .net core 3.0 when I generated the soap client using svc util(by adding a connected reference) it wouldn't let me send correct messages.

So I created a client like so:

   [ServiceContract(Namespace = "SomeNameSpace")]
   public interface IUMService
    {
        [OperationContract(Action = "SendMessage", Name = "SendMessageRequest", ReplyAction = "SendMessageResponse",  AsyncPattern = true)]
        Task<ReturnObject> SendMessageRequestAsync(Object1 obj1, Obj2 obj2);
    }

First I would just get a null response so I changed my return type to stream which gave me following error:

Start element 'SendMessageRequestResponse' from namespace 'urn:be:healthconnect:unifiedmessagingservice:1_0:common' expected. Found element 'SendMessageResponse' from namespace 'urn:be:healthconnect:unifiedmessagingservice:1_0:common'. Line 1, position 262.

With my very basic understanding of Soap clients the ReplyAction attribute should take care of this except it doesn't.

0 Answers
Related