Duplicated class in my WCF proxy RRS feed

  • 问题

  • Hi...

    I'm new to WCF development and these days I'm trying to develop my first WCF application. Yesterday, when I was generate the proxy class by using svcutil (svcutil http://localhost:8085/CustomerService /out:c:\clientcode.cs /config:app.config) then I just found there are two duplicated class out there...

    Sever Side:


        public interface ICustomerService
            QueryCustomerResponse QueryCustomer(QueryCustomerRequest request);

        public class QueryCustomerRequest : RequestMsg
            public int MarketId { get; set; }

            public DateTime FromDate { get; set; }

            public DateTime ToDate { get; set; }

    Client Side:

    As you can see in following bits, there are two classes, one object name is QueryCustomerRequest and the other one is QueryCustomerRequest1, however I've never defined the second object (QueryCUstomerRequest1) in service side, can someone help to solve this issue?

        QueryCustomerResponse1 ICustomerService.QueryCustomer(QueryCustomerRequest1 request)
            return base.Channel.QueryCustomer(request);

        public QueryCustomerResponse QueryCustomer(QueryCustomerRequest request)
            QueryCustomerRequest1 inValue = new QueryCustomerRequest1();
            inValue.request = request;
            QueryCustomerResponse1 retVal = ((ICustomerService)(this)).QueryCustomer(inValue);
            return retVal.QueryCustomerResult;


    2015年6月12日 0:05