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 these ads

About this entry