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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Schema importer extension and target type ReadXml method ????

Schema importer extension and target type ReadXml method ????

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasexmlquestion
1 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
    devboycpp
    wrote on last edited by
    #1

    A new Schema importer extension was created to return a Forum object instead of Book object when invoking Select method of a web service.When running a asp.net web page that invokes the Select method of the web service(which returns Book object) the WriteXml method of Book class(original type returned by web service method) is invoked and the object Serializes itself there and then ReadXml method of Forum class(new type registered by schema importer) is invoked but the XmlReader parameter does not contain actual data :

    void IXmlSerializable.ReadXml(XmlReader reader)
    {
    this.title = reader.GetAttribute("title") + " by " + reader.GetAttribute("author");
    this.bookID = reader.GetAttribute("bookID");
    }

    reader.GetAttribute("title") and reader.GetAttribute("author") return null and finally the Forum object returned from Select method of the web service contains empty fields ? Am I missing something in implementing this Schema importer extension?

    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