Simon Martinelli
Simon Martinelli

Reputation: 36223

How to generate Java classes from REST

With SOAP WebSevices and WSDL it's very easy to generate a Java WebService client with wsimport.

Is there a similar way to do this for Java REST clients?

Thanks, Simon

Upvotes: 3

Views: 3150

Answers (2)

Ashish Shinde
Ashish Shinde

Reputation: 79

Take a look at Alchemy Rest Client Generator. It can generate a jersey 2.0 java client for your JAX-RS REST services by integrating into your server builds.

The client will mimic the exact service API. However this project does not yet support WADL and does not handle marshalling and demarshalling of your transfer objects.

Disclaimer: I am the author of this project.

Upvotes: 1

socha23
socha23

Reputation: 10239

Do you have a WADL descriptor for your REST service?

If so, you can use wadl2java or maybe something built-in in your IDE (IDEA for example has a wizard for that).

Upvotes: 0

Related Questions