如何使用Jersey 1.7生成WADL文件 [英] How to generate WADL file using Jersey 1.7

查看:187
本文介绍了如何使用Jersey 1.7生成WADL文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个hello world REST服务,现在我想生成WADL文件。

I created a hello world REST service and now I d like to generate the WADL file.

我环顾四周,看到我可以通过以下方式这样做:

I looked around and saw that I can do so by calling :

http://localhost:8090/application.wadl

但是在我的案例中我什么都得不到。我正在使用带有Eclipse Indigo的Jersey 1.7并在Apache 7上运行

However I dont get anything in my case. I am using Jersey 1.7 with Eclipse Indigo and running on Apache 7

我也试过调用:

http:// localhost:8090 /< myapplicattion_name> .wadl 但仍无结果。

此功能是否受支持泽西岛1.7?如果是,我做错了什么?

Is this feature supported by Jersey 1.7? If yes what do i do wrong?

web.xml文件如下所示:

The web.xml file looks like this:

谢谢

推荐答案

您的应用程序在Apache中的名称是什么,即上下文?假设名称是restApp。试试这个:

What is the name of your app in Apache, i.e., "context"? Assume the name is "restApp". Try this:

http://localhost:8090/restApp/application.wadl

或者,如果你的servlet映射是:

Or, if you servlet mapping is:

<servlet-mapping>
  <servlet-name>RESTService</servlet-name>
  <url-pattern>/company/rest/*</url-pattern>
</servlet-mapping>

..它将是:

http://localhost:8090/restApp/company/rest/application.wadl

这篇关于如何使用Jersey 1.7生成WADL文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆