This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Request xml validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Request xml validation" Watch "Request xml validation" New topic

Request xml validation

Poornima Sharma
Ranch Hand

Joined: Sep 09, 2008
Posts: 114
Hi Friends,

How can we ensure that our request xml does not have any unwanted tags. As per my current implementation the unwanted tags are simply ignored by the webservice, how can we mandate that the request xml has only the necessary tags.


Poornima Sharma
SCJP 6.0
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
Add a web service handler that validates incoming and/or outgoing messages.
An example on how to develop a web service handler can be found in section 9.5 of this document:
There are also examples on how to perform validation of XML against a XML schema elsewhere in the same document.
Best wishes!

My free books and tutorials:
I agree. Here's the link:
subject: Request xml validation
It's not a secret anymore!