0

i am trying to make Wadl file for rest services in my application , i am using resteasy , all tutorials and examples is to make it with maven & jersy i dont use maven i use eclipse Wildfly and Resteasy , is there is any explanation how to make this .

thank you.

Yousef Al Kahky
  • 703
  • 1
  • 8
  • 23
  • 1
    Please use some formatting for your question, to more clearly show what you are looking for. Also explain what you tried so far, and which specific problems you are running into. – haraldkl Sep 07 '15 at 17:08
  • i want to make wadl file for rest services with resteasy and i didn't use maven , all examples is to make it with ` maven-wadl-plugin ` and with jersy , i want to make it with resteasy @haraldkl – Yousef Al Kahky Sep 08 '15 at 08:31
  • Have a look at https://stackoverflow.com/a/41471710/2528609 – mvermand May 23 '17 at 15:13

1 Answers1

1

As of Resteasy 3.0.14-Final this should be possible:

https://issues.jboss.org/browse/RESTEASY-166

https://docs.jboss.org/resteasy/docs/3.1.0.Final/userguide/html/WADL.html

Add this to your web.xml:

<servlet>
    <servlet-name>RESTEasy WADL</servlet-name>
    <servlet-class>org.jboss.resteasy.wadl.ResteasyWadlServlet</servlet-class>
</servlet>

<servlet-mapping>
    <servlet-name>RESTEasy WADL</servlet-name>
    <url-pattern>/application.xml</url-pattern>
</servlet-mapping>

I tried this on WildFly 10.1.0 and I had to include an extra library:

Maven artifact: https://javalibs.com/artifact/org.jboss.resteasy/resteasy-wadl

Add the following to your pom.xml:

    <!-- https://mvnrepository.com/artifact/org.jboss.resteasy/resteasy-wadl -->
    <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-wadl</artifactId>
        <version>3.0.14.Final</version>
        <exclusions>
            <exclusion>
                <groupId>org.jboss.resteasy</groupId>
                <artifactId>resteasy-jaxrs</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

Next re-publish and access the WADL at [context-root]/application.xml

mvermand
  • 5,829
  • 7
  • 48
  • 74
  • it works on wildfly 10 fine , this question wildfly 10 is not released officially . thank you :) – Yousef Al Kahky May 23 '17 at 15:32
  • did you manage to get it working? I got a WADL file but without grammar section: https://stackoverflow.com/questions/44112418/missing-grammar-in-jboss-resteasy-generated-wadl – mvermand May 23 '17 at 15:34