How to generate wadl file for resteasy in jboss

旧巷老猫 提交于 2019-12-05 20:51:07

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!