Why does WCF sometimes add “Field” to end of generated proxy types?

前端 未结 5 2168
夕颜
夕颜 2021-02-04 05:11

Basically, I have a server-side type \"Foo\" with members X and Y. Whenever I use Visual Studio\'s \"Add Server Reference\" then I see the WSDL and the generated proxy both appe

5条回答
  •  無奈伤痛
    2021-02-04 05:39

    Adding XmlSerializerFormat worked for me. Got solution from http://geekswithblogs.net/mipsen/archive/2010/02/06/field-postfix-in-wcf-reference.aspx

    [ServiceContract(Namespace="http://somenamespace.com/contracts")]    
    public interface ISchemaService
    {
        [OperationContract]
        [XmlSerializerFormat]
        void DoSomething(GeneratedType data);
    }
    

提交回复
热议问题