Question

Hi I am working REST Services and I just want to know how can I provide the web descriptor for REST Services. It will be great if their is some API that can directly produce the WSDL for REST Service. I am using Spring STS for development is their anything inbuilt in Spring STS.

I have few more questions for the same:

  1. Is it feasible to provide the descriptor for REST Service.
  2. Providing the descriptor is not the violation of REST or HATEOS architecture style.
  3. What are the different ways to achieve this.
Was it helpful?

Solution

REST services shouldn't use WSDLs. WSDLs are used for SOAP Web services, not for the REST design style.

Instead of using WSDLs, REST APIs should be discoverable.

OTHER TIPS

Possible duplicate of this Stackoverflow question.

Though it's possible to generate some sort of WSDL if you use WSDL 2.0, people don't seem to generally describe REST services with WSDLs. This is because REST services are usually HTTP requests with GET/PUT/POST/etc methods.

At best, people can generate something called a WADL, but generating WADLs hasn't really taken off in the general community.

There's no de facto standard for describing REST APIs. If you need to automate it, I recommend looking up how to generate WADLs.

There are also other solutions/alternatives out there used to document and describe REST APIs. It all depends on what your actual requirements are.

Some other good Stackoverflow questions to explore:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top