Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Webservices Problem??

Webservices Problem??

Scheduled Pinned Locked Moved ASP.NET
helpquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vanamaindia
    wrote on last edited by
    #1

    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???

    S R P 3 Replies Last reply
    0
    • V Vanamaindia

      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???

      S Offline
      S Offline
      Sathesh Sakthivel
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • V Vanamaindia

        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???

        R Offline
        R Offline
        ReactiveX
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • V Vanamaindia

          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???

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          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.

          My blog | My articles

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups