How to generate wadl file for resteasy in jboss

孤者浪人 提交于 2020-01-02 07:06:24

问题


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

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