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. General Programming
  3. XML / XSL
  4. Using existing XSD with WebService

Using existing XSD with WebService

Scheduled Pinned Locked Moved XML / XSL
databasewcfcommcpbusiness
3 Posts 2 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.
  • G Offline
    G Offline
    Grimolfr
    wrote on last edited by
    #1

    I'm fairly new to web services, an I've run into a little difficulty that I haven't been able to find a solution for. I need to write a web service that is basically public XmlDocument MyService(XmlDocument parameter) {...}. The request and response XmlDocuments each need to conform to specific previously-existing XSD schema definitions. Is there a way that I can set up a WebMethod to use an XSD file to define the content requirements of the parameter? (And likewise use yet another XSD file to define the return value?)


    Grim

    (aka Toby)

    MCDBA, MCSD, MCP+SB

    Need a Second Life?[^]

    SELECT * FROM users WHERE clue IS NOT NULL GO

    (0 row(s) affected)

    J 1 Reply Last reply
    0
    • G Grimolfr

      I'm fairly new to web services, an I've run into a little difficulty that I haven't been able to find a solution for. I need to write a web service that is basically public XmlDocument MyService(XmlDocument parameter) {...}. The request and response XmlDocuments each need to conform to specific previously-existing XSD schema definitions. Is there a way that I can set up a WebMethod to use an XSD file to define the content requirements of the parameter? (And likewise use yet another XSD file to define the return value?)


      Grim

      (aka Toby)

      MCDBA, MCSD, MCP+SB

      Need a Second Life?[^]

      SELECT * FROM users WHERE clue IS NOT NULL GO

      (0 row(s) affected)

      J Offline
      J Offline
      Javier Lozano
      wrote on last edited by
      #2

      Just a quick question, why are you using XmlDocument as a data transport? ~Javier Lozano

      G 1 Reply Last reply
      0
      • J Javier Lozano

        Just a quick question, why are you using XmlDocument as a data transport? ~Javier Lozano

        G Offline
        G Offline
        Grimolfr
        wrote on last edited by
        #3

        Because it's a B2B interface, and the specification I'm working from specifies an XML schema that the input parameter and return value have to comply with. Since the remote client will be sending XML, and I'll have to return XML, and I use XML internally in the service, there's really not much point to converting the data from XML into some artificial object model, just to convert it back to XML.


        Grim

        (aka Toby)

        MCDBA, MCSD, MCP+SB

        Need a Second Life?[^]

        SELECT * FROM users WHERE clue IS NOT NULL GO

        (0 row(s) affected)

        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