Change <SOAPAction>“”</SOAPAction> on request recieved in WCF RRS feed

  • Question

  • I have a WCF service implemented via custom wsdl. It simple have 5 methods as per wsdl. Call to My service from standard client works fine. Problem was in some old implementation which send SoapAction="" I wanted to change the soapAction to some value if i got empty. For that I have implemented CustomBehavior but even in it I can't able to hit AfterReceiveRequest method or any method in the behavior

    public class CustomInspectorBehavior : Attribute, IDispatchMessageInspector, 
            IClientMessageInspector, IEndpointBehavior, IServiceBehavior

    Any idea i can response even if i have SOAPAction="" in the request

    My other post o stackoverflow is as following

    Kamran Shahid Application Developer (MCP,MCAD,MCSD.NET,MCTS,[web])

    Saturday, December 12, 2015 8:39 AM


  • Hi Kamran,

    You want to change the soapAction as shown below node?

    <soap12:operation soapAction="" style="document"" />

    If so, you can change your code like this:

    [ServiceContract(Namespace = "")]
    public interface IMyServiceContract
        void MyMethod();

    Then it will shown as this :

    <soap12:operation soapAction="" style="document" />



    Thursday, December 24, 2015 11:06 AM