• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Validate without Parsing

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All ,

I'm treading new territories with XML, and I'm reviewing some code that was previously written by someone else, using the SAX parser to validate and parse an XML document in one shot, on the Service side. But what I would like to do is Validate ONLY on the Client side. That way if there is something incorrect, an error can be displayed to the clients right away. If no errors occurs, then on the Service side all we have to do is parse the document to process the request. Also, we expect a large amount of job request, so, this would cut off a few milliseconds from our service's processing time for each job.

I would appreciate any suggestions or code samples that anyone can provide.

Thanks,
Lulu
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Assuming that the client side is not under your direct control, it would be a mistake to assume that the client input is valid, no matter what process has supposedly been run on the client side.
Depending on what your service actually does, it could even be a security hole.
How do your clients prepare their XML submissions?
Bill
 
Elle Atechsy
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are going to provide an XML generator class that will take in parameters, build the appropriate XML tags around the data,So the XML will be well formed. However, we want to validate the values in the parameters against the schema. If all is ok, we will create an XML command file that will be processed by the service component.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic