问题
I want to generate a wadl file for my project which is using resteasy + Jboss 6.4 + Maven. There are many examples given for jersey but not for resteasy does anyone used it for resteasy
回答1:
Resteasy since 3.0.14.Final do support WADL generation. You need to add resteasy-wadl to your dependency manager (e.g. maven):
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-wadl</artifactId>
<version>3.0.19.Final</version>
</dependency>
then declare a new servlet endpoint in your web.xml for providing generated wadl file:
<servlet>
<servlet-name>WADL</servlet-name>
<servlet-class>org.jboss.resteasy.wadl.ResteasyWadlServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>WADL</servlet-name>
<url-pattern>/application.wadl</url-pattern>
</servlet-mapping>
Sources code:
https://github.com/resteasy/Resteasy/tree/master/resteasy-wadl
Implementation ticket:
https://issues.jboss.org/browse/RESTEASY-166
Examples from Resteasy:
https://github.com/resteasy/resteasy-examples/tree/master/wadl-example/src/main/java/org/jboss/resteasy/wadl/testing
来源:https://stackoverflow.com/questions/38475036/how-to-generate-wadl-file-for-resteasy-in-jboss