Keep getting Invalid Invalid SoapAction error no matter what....

Hi,

I have a remote object exposed using a Http channel with Soap formatter, which publishes itself to the remoting system programmatically. The Http channel is configured in the application configuration file.

    [ WebServiceBinding(Name="NotificationBinding",
          Namespace="http://tempuri.org")]
    public class MyService : MarshalByRefObject
    {
        public MyService() : base()
        {

        }

       public void Init()
       {
   RemotingConfiguration.Configure(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile);
            RemotingServices.Marshal(this, "MyService.soap");
       }

        [SoapRpcMethodAttribute("Notify",
             RequestElementName="Notify",
             RequestNamespace="http://tempuri.org",
             ResponseElementName="NotifyResponse",
             ResponseNamespace="http://tempuri.org")]
        public void Notify(string data)
        {
             Console.WriteLine("Received: "+data);
        }
    }

I also have a proxy class which extends SoapHttpClientProtocol which I want to use to communicate with the remote object as if it were a standard web service.

[WebServiceBinding(Name="NotificationBinding",                       Namespace="http://tempuri.org")]
public class MyProxy : SoapHttpClientProtocol
{
        [SoapRpcMethodAttribute("Notify",
            RequestNamespace="http://tempuri.org",
            ResponseNamespace="http://tempuri.org")]
        public void Notify(string data)
        {
            this.Invoke("Notify", new object[] {data});
        }
}

No matter what I do to the SoapAction values on both the proxy and server, I keep getting the exception below, with the SoapAction value changing to whatever I set it to.

**** System.Runtime.Remoting.RemotingException - Invalid SOAPAction specified: "Notify"

I am using the Tcp trace tool http://www.pocketsoap.com/tcptrace, to analyse the soap messages. Everything appears to be correct, soapaction http header, namespaces etc....

Is there anyway I can debug or switch on debugging for the SoapServerFormatterSink to see what on earth is going on as this error message is not getting me anywhere Or even better perhaps identify what I am doing wrong here :)

Thanks.

Stefan


Answer this question

Keep getting Invalid Invalid SoapAction error no matter what....

  • Inna Tzipris

    I have solved the problem.... as it turns out I found a windows service running in the background using a remoting port on the same one as I was testing with, but not running the service I was testing. I should have at least got an appropriate error message back...

    Anyway, please ignore this post.

  • Sourabh

    Hi!

    May you mail me the whole code of Cline-Server Remotin through HTTP .

    Thanks in advance.



  • Keep getting Invalid Invalid SoapAction error no matter what....