Using existing XSD with WebService
-
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
SELECT * FROM users WHERE clue IS NOT NULL GO
(0 row(s) affected)
-
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
SELECT * FROM users WHERE clue IS NOT NULL GO
(0 row(s) affected)
Just a quick question, why are you using
XmlDocument
as a data transport? ~Javier Lozano -
Just a quick question, why are you using
XmlDocument
as a data transport? ~Javier LozanoBecause 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
SELECT * FROM users WHERE clue IS NOT NULL GO
(0 row(s) affected)