none
Why generated WCF proxy always contains message contracts RRS feed

  • Question

  • Hi,

    I'm using VS2012 and framework 4.5.

    With generated WCF proxy calling an old asmx web service (using visual studio with add Service Reference), I notice that the message contract are always generated. The proxy is generated as if the option "always generate message contract" in the service reference configuration is checked.

    For instance with the most simple service like this one :

    [WebMethod]
    public string HelloWorld()
    {
       return "Hello World";
    }

    the following classes are generated :

    Why the WebService1Soap interface does not contain a simple HelloWorld method with no parameter ? Why are generated the HelloWorldRequest, HelloWorldRequestBody ? I tought these classes were only generated when the option "message contract" was choosen.

    Regards

    Thursday, October 10, 2013 4:45 PM

Answers

All replies