Hello group
My problem: An XML feed of about 1000+ records needs to be sent over the web
and validated against an XML schema.
I am considering 2 possible solutions to achieve this, but would welcome any
suggestions on what would be the best approach:
1. Create data classes from the XML schema. Populate these with records and
pass them as complex data types (structs) via the WebMethod. I'm thinking
this would ensure that the XML that gets returned is valid and complies to
the schema from the very beginning and therefore will not require a
validation check using the XmlValidatingReader.
2. The client requests the records from an intermediary webservice (ws-A)
which calls the second webservice (ws-B)
The function of ws-A is to invoke the recordset from ws-B and validate the
XML returned by ws-A.
If the records are valid, it will bundle the XML into the SOAP body and
return the XML to the client. Otherwise it will return an a SOAP error
notifying the client of invalid XML.
The second approach is obviously a poor solution and I'm not even sure if
the the first solution is a best-practice approach. Would really appreciate
some pointers.
Thanks
cT