[英]How can I generate WADL for REST services
I have a web application providing more than 30 REST services (using Jersey) to clients.我有一个 Web 应用程序,为客户提供 30 多个 REST 服务(使用 Jersey)。 Is it possible to automatically create a WADL document for my application?
是否可以为我的应用程序自动创建 WADL 文档?
I need this, so that I can have it configured in SoapUI for testing various scenarios and save it for later use.我需要这个,以便我可以在 SoapUI 中配置它以测试各种场景并保存以备后用。
If you are using Jersey then url to wadl would be something like如果您使用的是 Jersey,那么 wadl 的 url 将类似于
http://localhost:8080/applicationname/application.wadl
You may need to add the resource base into the url eg您可能需要将资源库添加到 url 中,例如
http://localhost:8080/applicationname/resources/application.wadl
http://{host}:{port}/{context_root}/{resource}/application.wadl
替换host
、 port
、 context root
和resource
。
In the past I've used Enunciate ( GitHub repository ).过去我使用过Enunciate ( GitHub 存储库)。
It's a build-time tool that generates Interface Definition Documents (WADL, WSDL, etc) automatically for you.它是一个构建时工具,可以自动为您生成接口定义文档(WADL、WSDL 等)。 It's really easy to integrate it in your Maven build.
将它集成到您的 Maven 构建中真的很容易。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.