My basic assumption is that with a SOAP web service, the provided WSDL would contain XSD describing the data types sent and received. When developing a client in Java, tools like wsimport can be used to generate classes corresponding to the elements of the WSDL, and in particular the complex data types. This frees the developer of the SOAP client from creating classes representing the return types (and/or complex parameters).
By contrast, with REST api's I have not typically seen -
- A WSDL 2.0 http://www.ibm.com/developerworks/webservices/library/ws-restwsdl/
- A WADL http://www.w3.org/Submission/wadl/
- (If server and client both Java) just provide the same JAXB classes used on the server side
- XSD
So my question is - as an author of a REST server side api, what is the best way to provide the relevant data types to clients?