Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9258933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:31:55+00:00 2026-06-18T12:31:55+00:00

Is there a tool which takes a Java File what describes a REST service

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:31:56+00:00Added an answer on June 18, 2026 at 12:31 pm

    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:

    <build>
    <plugins>
        <plugin>
            <groupId>com.sun.jersey.contribs</groupId>
            <artifactId>maven-wadl-plugin</artifactId>
            <version>1.17</version>
            <executions>
                <execution>
                    <id>generate</id>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                    <phase>${javadoc-phase}</phase>
                </execution>
            </executions>
            <configuration>
                <wadlFile>${project.build.outputDirectory}/application.wadl
                </wadlFile>
                <formatWadlFile>true</formatWadlFile>
                <baseUri>http://example.com:8080/rest</baseUri>
                <packagesResourceConfig>
                    <param>com.example.rs.resource</param>
                </packagesResourceConfig>
                <wadlGenerators>
                    <wadlGeneratorDescription>
                        <className>com.sun.jersey.server.wadl.generators.WadlGeneratorApplicationDoc
                        </className>
                        <properties>
                            <property>
                                <name>applicationDocsFile</name>
                                <value>${basedir}/src/main/doc/application-doc.xml</value>
                            </property>
                        </properties>
                    </wadlGeneratorDescription>
                    <wadlGeneratorDescription>
                        <className>com.sun.jersey.server.wadl.generators.WadlGeneratorGrammarsSupport
                        </className>
                        <properties>
                            <property>
                                <name>grammarsFile</name>
                                <value>${basedir}/src/main/doc/application-grammars.xml</value>
                            </property>
                        </properties>
                    </wadlGeneratorDescription>
                </wadlGenerators>
            </configuration>
        </plugin>
    </plugins>
    </build>
    

    Pay attention to the buildUri and packagesResourceConfig elements. 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:

    <?xml version="1.0" encoding="UTF-8"?>
    <applicationDocs targetNamespace="http://wadl.dev.java.net/2009/02">
        <doc xml:lang="en" title="A message in the WADL">This is added to the start of the generated application.wadl</doc>
    </applicationDocs>
    

    File: application-grammars.xml

    Content:

    <?xml version="1.0" encoding="UTF-8" ?>
    <grammars xmlns="http://wadl.dev.java.net/2009/02" />
    

    3. Run the maven command.

    Go to the project folder and run the following command:

    $ mvn compile com.sun.jersey.contribs:maven-wadl-plugin:generate
    

    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).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any diff tool specifically for Java that doesn't just highlight differences in
I'm developing tool, which takes Java code and generate code for getting estimations for
I am trying to write a small web tool which takes an Excel file,
The command line tool ec2-run-instances takes a -f parameter to pass a file to
Is there any tool which gives you the view of current execution of you
Is there a tool which is able to parse my source code (fortran, C
Similar to DumpRenderTree tool which dumps render tree onto disk, is there any tool
Is there a tool available which will convert source code in Perl to source
Is there any reporting tool which offers multilingual support (namely English en-US and Arabic
Is there a tool like phpMyAdmin which can be configured to access only a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.