XML Validation Web Service
This example demonstrates how an XML document can be passed to a Web Service
that validates the XML against a schema and then processes it accordingly. The XML
shown below will validate successfully. By making changes to it you'll see that validation fails.
XML Document to send to the Web Service
<golfers xmlns="http://www.golfExample.com"> <golfer skill="excellent" handicap="12" clubs="Taylor Made" id="1111"> <name> <firstName>Paul</firstName> <lastName>Allsing</lastName> </name> <favoriteCourses> <course city="Pinetop" state="AZ" name="Pinetop Lakes CC" /> <course city="Phoenix" state="AZ" name="Ocotillo" /> <course city="Snowflake" state="AZ" name="Silver Creek" /> </favoriteCourses> </golfer> <golfer skill="moderate" handicap="8" clubs="Taylor Made" id="2222"> <name> <firstName>Dan</firstName> <lastName>Wahlin</lastName> </name> <favoriteCourses> <course city="Pinetop" state="AZ" name="Pinetop Lakes CC" /> <course city="Pinetop" state="AZ" name="White Mountain CC" /> <course city="Springville" state="UT" name="Hobble Creek" /> </favoriteCourses> </golfer> </golfers>
Status: