Is there a tool which takes a Java File what describes a REST service as a parameter and generates a wadl file out of that.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I had the same problem: was using RESTeasy and wanted to find a way to generate the WADL automatically.
Did some research and came to the solution below.
1. Add this to your
pom.xml:Pay attention to the
buildUriandpackagesResourceConfigelements. You have to change them to reflect your project’s configuration. You may also want to change the plugin’s version (I used 1.17).2. Create a /doc folder and add some files.
Create the
src/main/doc/folder and create the two files below.File: application-doc.xml
Content:
File: application-grammars.xml
Content:
3. Run the maven command.
Go to the project folder and run the following command:
The files
\target\classes\application.wadl(the WADL itself) and\target\classes\xsd0.xsd(the schema of the resources – it’s used by the application.wadl) should be generated.Edit and use them as you wish.
PS.: Bear in mind that this is a very simple use of the maven-wadl-plugin. It can do a lot more. To know it better, please refer to the zip file mentioned in the other answer (by Pavel Bucek).