简体   繁体   中英

Generating rest client from WADL URL in JAVA

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,

There are many ways to generate the rest client, some tied to IDEs like eclipse , IntelliJ which are available as plugins. 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. In this regard CXF is pretty cool and has an awesome MAVEN plugin which has good coverage and generate jax-rs code. It's easy to setup. Here's the reference link: http://cxf.apache.org/docs/jaxrs-services-description.html#JAXRSServicesDescription-wadl2javaMavenplugin

Do give it a try and share your thoughts.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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