Webservices Problem??
-
Can we Write GET,Set Property in WebServices? I create One Property .in Webservice... I Want to Access that Property in Client App... Is it Possible???
-
Can we Write GET,Set Property in WebServices? I create One Property .in Webservice... I Want to Access that Property in Client App... Is it Possible???
When you want to expose your custom made business objects through a webservice interface, and you want them to bind with a DataGrid, you have a problem that the generated proxy class exposes fields instead of properties. A possible solution is to generate at runtime, a wrapper for your proxy class.
SSK. Anyone who says sunshine brings happiness has never danced in the rain.
-
Can we Write GET,Set Property in WebServices? I create One Property .in Webservice... I Want to Access that Property in Client App... Is it Possible???
Treat a web method as a property in a web-service. Web Methods will expose all your objects to your client for consumption, but make sure that you declare those objects in your service class in order to expose them as return objects.
Daniel Minnaar .NET Solutions Architect
-
Can we Write GET,Set Property in WebServices? I create One Property .in Webservice... I Want to Access that Property in Client App... Is it Possible???
It is possible - with limitations. Effectively a property is just a set of special methods marked as get_ and set_ such as:
private int _item; public int get_Item() { return _item; } public void set_Item(int value) { _item = value; }
A limitation though is that a web service is stateless, so you need to be careful how you maintain the state.
Deja View - the feeling that you've seen this post before.