简体   繁体   English

从JAVA中的WADL URL生成rest客户端

[英]Generating rest client from WADL URL in JAVA

WADL URL : http://localhost:8080/RestfulSample/Restful?_wadl WADL URL: http:// localhost:8080 / RestfulSample / Restful?_wadl

I need to generate the rest client using CXF from the above WADL URL. 我需要使用上面的WADL URL中的CXF生成其余客户端。

Questions : 问题:

  1. Do we have any eclipse plugin to accomplish it? 我们有任何eclipse插件来完成它吗?
  2. or do we have any other tools/way to do it? 或者我们还有其他工具/方法吗?

I seen many questions related to this, but it seems to be too older and not useful for me - It will be appreciated if i could get any response here. 我看到很多与此相关的问题,但它似乎太老了,对我没用 - 如果我能得到任何回复,我将不胜感激。

Thanks, 谢谢,

There are many ways to generate the rest client, some tied to IDEs like eclipse , IntelliJ which are available as plugins. 生成休息客户端的方法有很多种,其中一些方法与eclipse,IntelliJ等可以作为插件使用的IDE相关联。 However it's not an approach that's cuts across environments. 然而,这并不是一种跨越环境的方法。 The recommended way is to tie the code generation to project build / life cycle tool like maven, gradle. 推荐的方法是将代码生成与项目构建/生命周期工具(如maven,gradle)联系起来。 In this regard CXF is pretty cool and has an awesome MAVEN plugin which has good coverage and generate jax-rs code. 在这方面,CXF非常酷,并且有一个非常棒的MAVEN插件,具有良好的覆盖率并生成jax-rs代码。 It's easy to setup. 它很容易设置。 Here's the reference link: http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-wadl2javaMavenplugin 这是参考链接: http//cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-wadl2javaMavenplugin

Do give it a try and share your thoughts. 试一试,分享你的想法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM