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. Returning Collections from Web Service

Returning Collections from Web Service

Scheduled Pinned Locked Moved ASP.NET
data-structuresxmlquestion
2 Posts 1 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.
  • D Offline
    D Offline
    Dr Herbie
    wrote on last edited by
    #1

    Hi, I'm trying to write my first serious (not 'Hello WOrld') web service to return a collection of objects. However, despite having the correct type return in the WS - public SubstanceCollection GetSubstances() - the consumer will only return an array of objects, which appear to actually be XML Nodes. I would like to be able to access the objects as a collection -- am I missing something? :confused: Dr Herbie. Remember, half the people out there have below average IQs.

    D 1 Reply Last reply
    0
    • D Dr Herbie

      Hi, I'm trying to write my first serious (not 'Hello WOrld') web service to return a collection of objects. However, despite having the correct type return in the WS - public SubstanceCollection GetSubstances() - the consumer will only return an array of objects, which appear to actually be XML Nodes. I would like to be able to access the objects as a collection -- am I missing something? :confused: Dr Herbie. Remember, half the people out there have below average IQs.

      D Offline
      D Offline
      Dr Herbie
      wrote on last edited by
      #2

      OK, almost there. I continued delving around in MSDN and found the article : DataSets, Web Services, DiffGrams, Arrays, and Interoperability[^] So I now have a web method that returns an array of classes. Hooray.:) But is it still possible to return a typed collection (as opposed to an array)? Dr Herbie. Remember, half the people out there have below average IQs.

      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