Generating rest client from WADL URL in JAVA

时间:2015-11-12 12:01:17

标签: java web-services rest cxf cxf-client

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

I need to generate the rest client using CXF from the above WADL URL.

Questions :

  1. Do we have any eclipse plugin to accomplish it?
  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,

1 个答案:

答案 0 :(得分:1)

有许多方法可以生成其余的客户端,其中一些与eclipse,IntelliJ等可以作为插件提供的IDE相关联。然而,这并不是一种跨越环境的方法。推荐的方法是将代码生成与项目构建/生命周期工具(如maven,gradle)联系起来。 在这方面,CXF非常酷,并且有一个非常棒的MAVEN插件,具有良好的覆盖率并生成jax-rs代码。它易于设置。这是参考链接:http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-wadl2javaMavenplugin

请尝试分享您的想法。