Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Why are properties not available in WebService?

Reply
Thread Tools

Why are properties not available in WebService?

 
 
Paul Liebrand
Guest
Posts: n/a
 
      02-09-2004
Can someone tell me (or point me to documentation) that explains why Properties are not available in WebService?
 
Reply With Quote
 
 
 
 
Michael Pearson
Guest
Posts: n/a
 
      02-09-2004
It's probably due to the statelessness of the Web.

One solution might be to create a class with all the properties you want on
the client side, and just pass that whole class into the webservice. It
could then get whatever state data it needs from that class and do it's
thing. I think I'd just suggest passing all of yoru arguments into each
method though.

Michael

"Paul Liebrand" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> Can someone tell me (or point me to documentation) that explains why

Properties are not available in WebService?


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.573 / Virus Database: 363 - Release Date: 1/28/2004


 
Reply With Quote
 
 
 
 
Sami Vaaraniemi
Guest
Posts: n/a
 
      02-09-2004

"Paul Liebrand" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why aren't any properties loading from jndi.properties? laredotornado Java 1 12-29-2009 11:33 PM
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
WHY MICROSOFT MADE PROFILES AVAILABLE IF THEN THEY DON'T SUPPLY ANY METHOD TO RETRIEVE THE CUSTOM PROPERTIES? george_Martinho@hotmail.com ASP .Net 0 01-09-2006 03:24 PM
Re: Web page is not available - "The Web page you requested is not available offline. To view this page, click Connect" Natty Gur ASP .Net 0 06-06-2004 05:46 AM



Advertisments