java 如何生成WADL文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5297837/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to generate WADL file?
提问by Tioma
I wrote RESTful web service using RESTeasy implementation and turn EJB into JSON. And now I'm on the way of development client side. I'm using Netbeans. How I can generate WADL file? And after I would generated client stub without any problem.
我使用 RESTeasy 实现编写了 RESTful Web 服务并将 EJB 转换为 JSON。现在我正在开发客户端。我正在使用 Netbeans。如何生成 WADL 文件?在我生成客户端存根之后没有任何问题。
Please, could you suggest me how I can do this? Or maybe you know different easy way.
拜托,你能建议我怎么做吗?或者也许你知道不同的简单方法。
Thanks a lot! Artem
非常感谢!阿尔特姆
采纳答案by Darrel Miller
Just FYI if you are trying to create a RESTful system, then generating client proxies using WADL will eliminate a significant number of the benefits REST provides.
仅供参考,如果您正在尝试创建 RESTful 系统,那么使用 WADL 生成客户端代理将消除 REST 提供的大量好处。
However, if you are using the term REST as a way to describe a Http API (HAPI) service then go right ahead and use WADL. I'm not saying this to be pedantic about terminology, I just want you to be aware that, if this the case, you are free to ignore all the "it's not RESTful" because you are not trying to do REST, and that's cool.
但是,如果您使用术语 REST 作为描述 Http API (HAPI) 服务的一种方式,那么请继续使用 WADL。我并不是说这是对术语的迂腐,我只是想让你意识到,如果是这种情况,你可以随意忽略所有“它不是 RESTful”,因为你不是在尝试做 REST,这很酷.
If you are trying to make a system where the client and server components can evolve independently over the next 5 to 10 years, then maybe REST is right for you in which case WADL is probably not what you want.
如果您正在尝试构建一个客户端和服务器组件可以在未来 5 到 10 年内独立发展的系统,那么 REST 可能适合您,在这种情况下,WADL 可能不是您想要的。