"Paul Liebrand" <> wrote in message
news

3EF8BBF-C602-47CF-B7B9-...
> Can someone tell me (or point me to documentation) that explains why
Properties are not available in WebService?
Are you asking why a WebService cannot expose properties the same way it can
expose WebMethods?
Well, I guess in theory the .NET Web services implementation could support
properties. All it would require is a mapping from the SOAP message on a
suitable property in the web service proxy class and in the web service
implementation.
However, properties make little sense with Web services because they imply
an object-oriented model, and Web services are not distributed objects.
There are a couple of issues.
First, having properties would encourage the design of chatty interfaces:
double x = webService.X;
double y = webService.Y;
double z = webService.Z;
With this you would get three roundtrips to the server. Instead of chatty,
you want to do chunky interfaces:
double[3] xyz = webService.getXYZ();
Another reason is that properties imply a stateful model:
webService.Foo = "Foo";
string foo = webService.Foo;
Diagnostics.Assert(foo == "Foo");
Again, this is not exactly what Web services are designed to do. Web
services typically maintain no state.
Sami