Contract-first Web Services: What are the different ways to define XML data contract?
I was glancing through Spring Web Services v2.0 framework reference tutorial today, and found an interesting piece of information that I’m gonna share with you all here:
While writing contract-first web services i.e. developing web services that start with the XML Schema/WSDL contract first followed by the Java code second, there are four different ways to define a contract for XML message format. They are:
* DTDs
* XML Schema (XSD)
* RELAX NG
* Schematron
DTDs have limited namespace support, so they are not suitable for Web services. Relax NG and Schematron certainly are easier than XML Schema. Unfortunately, they are not so widely supported across platforms. Hence the usage of XML Schema is preferred by almost all of the developers.
About this entry
You’re currently reading “Contract-first Web Services: What are the different ways to define XML data contract?,” an entry on Singaram's Tech Musings
- Published:
- July 26, 2011 / 9:15 PM
- Category:
- Spring, Spring-WS, Web Services
- Tags:
- Document Type Definition, Java, RELAX NG, Schematron, Web service, XML, XML schema

1 Comment
Jump to comment form | comment rss [?] | trackback uri [?]