-
Validation of XML Payload in request (1 messages)
- Posted by: Karan Peri
- Posted on: November 29 2006 01:57 EST
Hi, I have written a document/literal style web service that takes DOM Document as input and returns a DOM Document . In doc/lit style web services the DOM document will be opened and passed as XML payload in the request message. I want to validate this xml payload in the wsdl. Any ideas about how i can do this?Threaded Messages (1)
- Re: Validation of XML Payload in request by Ivor Bosloper on December 30 2006 12:35 EST
-
Re: Validation of XML Payload in request[ Go to top ]
- Posted by: Ivor Bosloper
- Posted on: December 30 2006 12:35 EST
- in response to Karan Peri
Do you use any framework, e.g. a jax-rpc framework like AXIS or JWSDP? I don't think you can validate input/output to a WSDL document, but if you put all your data in a separate .xsd file (which can be imported from the WSDL), you can validate the XML messsages to this schema. A simple approach to validating XML in Java is the validation API (javax.xml.validation) in JAXP1.3, see for example https://jaxp.dev.java.net/article/jaxp-1_3-article.html . An implementation is included by java 5 by default, but can also be used with jdk1.4 .