Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mvc rest services to generate a wadl [SPR-8705] #13347

Open
spring-issuemaster opened this issue Sep 18, 2011 · 13 comments

Comments

@spring-issuemaster
Copy link
Collaborator

commented Sep 18, 2011

chris snow opened SPR-8705 and commented

It would be good if Spring MVC Rest services could automatically generate a WADL. This will make the rest services much each to use in service (e.g. SOA) environments.


25 votes, 33 watchers

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 18, 2012

Tomasz Nurkiewicz commented

I wrote a simple WADL generator (see: Automatically generating WADL in Spring MVC REST application). The basic idea is to translate mapping found in RequestMappingHandlerMapping bean into WADL/JAXB classes. Not really that complicated.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 20, 2012

Anup Awasthi commented

It is great help. I will try this in my project and let's see how far I go..

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 21, 2012

Rossen Stoyanchev commented

Thank you Tomasz for sharing that.

In your blog you refer to a requirement to document and catalog all available resources and operations. You also mention the ability to use soapUI to show a tree of resources. I wonder if you could expand a bit more on your motivation for WADL? As a form of documentation it doesn't seem particularly well suited for human consumption, at least not without some additional API notes and comments along with a transformation into HTML. Or is it primarily about the ability to quickly create requests with tools like soapUI specifically where requests contain XML content.

It would also be good to hear from others with thoughts on the subject (or see votes).

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 21, 2012

Tomasz Nurkiewicz commented

Well, I don't want to turn this issue into a discussion Do we need WADL? Some people will love it, others will hate (claiming that REST should be self-descriptive) and some will just ignore it. But keep in mind that most of major JAX-RS implementations generate WADL from code automatically.

In my use case I was getting a bit lost in a plethora of controllers and mappings. My security is based on URLs and it was getting increasingly hard to find out what URLs I have and which HTTP methods do they support. Also it is not always obvious which Java method stands behind which URI. Ability to visualize it in soapUI is great, but for human-readable documentation obviously you need e.g. some XSLT transformation.

I don't consider WADL a must or "the right way" - I just think some people might benefit from it and since I already did some implementation sketch, I though about contributing the idea.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 4, 2012

Adithya Raghuraman commented

I agree with Tomasz in that WADL support in spring would be helpful for several developers.I felt a kinship with Tomasz when I developed a huge set of RESTful web services and and had to describe it to clients who are going to use integrate those services.
I personally don't believe that the majority of services that we need to develop right now is suited to be a RESTful service, given the simplistic requirements of REST. But given the wide adoption of WADL ( though it seems to be going the SOAPful way of becoming complicated ), the expectations of the integrating team towards a RESTful web service seems to be availability of a WADL in many cases and asking them to just look at the urls and the example request data just doesnt look right.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 6, 2012

Grégory Oliver commented

I have created a WadlGenerator controller in java based on the Tomasz Nurkiewicz article.
Perhaps it can help to integrate it in Spring ?
http://tuxgalaxy.blogspot.com/2012/03/spring3-et-wadl-generation.html

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented May 23, 2012

Ilinca Vintila Hallberg commented

+1 for adding wadl generation. I've tried the available scala library, it works pretty good for small projects but in larger projects it seems to be causing some severe memory issues (had to disable it, since it was causing GC overhead limit exceeded). Would be great to see this as part of spring.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented May 23, 2012

Tomasz Nurkiewicz commented

@Ilinca Vintila Hallberg - could you provide some more details about this problem? I am eager to fix it so the reference Scala implementation is bug free. You comment under original article.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Sep 6, 2012

Anup Awasthi commented

Can we use this directly in our java project or we have to create java counterpart project of this ?

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Oct 8, 2012

Gregory bonk commented

We're primarily SOAP and just starting some REST. A WADL would really help our customer's comfort level, and our experience with Spring WS contract first concept. I'd like to see this in spring by default. The WadlGenerators mentioned above work nicely.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 14, 2017

Destan Sarpkaya commented

hi spring team,

any intentions on adding this feature?

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Sep 5, 2017

SANKARA TELUKUTLA commented

Some customer wanted to see the wadl file to generate client java code. Please suggest if we have any other alternative.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 3, 2018

Mourad Jaber commented

Hi,

I hope this feature could be implemented as some JAX-RS implementation...

As a workaround, I found this maven plugin : https://github.com/autentia/wadl-tools/tree/master/spring-wadl-generator it does the job for my needs...

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.