• Post Reply Bookmark Topic Watch Topic
  • New Topic

XML Schema Validation  RSS feed

 
Ritu Kama
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a Web Service that recieves certain XML fragment in input SOAP message. Is there a way I can do Schema validation programmatically in the Web service to validate the input.
I want to be able to send SOAP Fault in case the input is not validated against the Schema.
Thanks
Ritu
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately it's not easily possible with the existing SOAP servers from Apache (Apache SOAP or Axis). By the time you get to the XML it has already been parsed by a non-validating parser.
Kyle
 
Ritu Kama
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Kyle. But I was thinking if I could apply a schema validation on XML included within Body. I have the schema file with me. Is their anyway I could associate the schema to the DOM parser and validate the XML.
Thanks
Ritu
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!