Windows Client using Generated WS Proxy

From: Gravy (Gravy_at_discussions.microsoft.com)
Date: 09/10/04


Date: Fri, 10 Sep 2004 15:13:05 +0100

Hi,

How many people are using a windows client to talk to their web service? I'm
interested on peoples view on using the classes that are generated
automatically when a web reference is added. More specifically the class
that represent the data that goes to and from the web service.

In a very simple solution I can see the ease of using the generated classes
but in a more complex solution does the case for using them still stand.

I have an application that has a windows client talking to a set of services
hosted in ASP.NET. Now whilst writing the service layer I created quite a
few classes that represent the data to method calls, i.e. entity type
classes. the typical sort of thing is a Customer or an Account.

Now, if I expose a web method that takes a Customer or Account the client
proxy that is generated automatically creates another definition for
Customer and Account. If MY entities contain the data plus a little
validation, i.e. Name cannot be empty or greater than 10 then I would want
my client to use them as well as the server. But this means I now have a
conflict. the WS Proxy thinks it knows what a Customer is and the client
code also thinks it knows what a Customer is.

Does anyone else suffer from these conflicts, or do people just use the
proxy generated class.

I can think of a couple of solutions to the problem.

1) Change the reference.cs file to use my namespace for my Customer and
Account class. Then remove the auto generated versions from this class.

2) Manually convert from my definition of a Customer to the proxy's
definition before a call the web service!!

One aspect of this that I'm worried about is versioning!!

Does anyone have any comments on this?

Regards

Graham Allwood



Relevant Pages

  • RE: Windows Client using Generated WS Proxy
    ... The solution I used was to generate one proxy using the tool and then I ... > How many people are using a windows client to talk to their web service? ... > that represent the data that goes to and from the web service. ... the typical sort of thing is a Customer or an Account. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Windows Client using Generated WS Proxy
    ... > The solution I used was to generate one proxy using the tool and then I ... > we had very good designs on our webservices before we started client side ... >> that represent the data that goes to and from the web service. ... the typical sort of thing is a Customer or an Account. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Double-entry for multi-currency trading software, Ronald.
    ... himself from the Client Account. ... That the client pays in advance. ... funds need to be kept is a separate bank account from his own. ... to have been bought by the customer straight from the supplier ...
    (uk.business.accountancy)
  • Re: Take Over Practices
    ... Or skip the raise for David, just give him use of the SSR. ... I cant remember losing an account because of price! ... this customer chose to seriously degrade his overall ... I figure if the client is so stupid that he'll jeopardize ...
    (alt.security.alarms)
  • Re: Double-entry for multi-currency trading software, Ronald.
    ... himself from the Client Account. ... What is the double entry on the Client Account? ... funds need to be kept is a separate bank account from his own. ... to have been bought by the customer straight from the supplier ...
    (uk.business.accountancy)