stoicflame / enunciate

Build-time enhancement tool for Java-based Web services projects
http://enunciate.webcohesion.com/
Other
480 stars 202 forks source link

support for generating client service interfaces for REST API #257

Open betenkowski opened 8 years ago

betenkowski commented 8 years ago

Hi,

I'm trying to generate Java client for a service using the json-java-client module. However, it seems to generate model (data) classes only, the client itself is missing. I cloned the repository and compiled the examples. There seems to be the same issue. E.g. after calling mvn install, it generates the following structure for jackson2-api:

➜  src git:(master) ✗ pwd
.../enunciate/examples/jackson2-api/target/enunciate/java-json-client/src
➜  src git:(master) ✗ find .
.
./com
./com/webcohesion
./com/webcohesion/enunciate
./com/webcohesion/enunciate/examples
./com/webcohesion/enunciate/examples/jaxrsjackson
./com/webcohesion/enunciate/examples/jaxrsjackson/genealogy
./com/webcohesion/enunciate/examples/jaxrsjackson/genealogy/data
./com/webcohesion/enunciate/examples/jaxrsjackson/genealogy/data/Assertion.java
./com/webcohesion/enunciate/examples/jaxrsjackson/genealogy/data/Event.java
./com/webcohesion/enunciate/examples/jaxrsjackson/genealogy/data/EventType.java
./com/webcohesion/enunciate/examples/jaxrsjackson/genealogy/data/Fact.java
./com/webcohesion/enunciate/examples/jaxrsjackson/genealogy/data/FactType.java
./com/webcohesion/enunciate/examples/jaxrsjackson/genealogy/data/Gender.java
./com/webcohesion/enunciate/examples/jaxrsjackson/genealogy/data/GenderType.java
./com/webcohesion/enunciate/examples/jaxrsjackson/genealogy/data/Name.java
./com/webcohesion/enunciate/examples/jaxrsjackson/genealogy/data/OccurringAssertion.java
./com/webcohesion/enunciate/examples/jaxrsjackson/genealogy/data/Person.java
./com/webcohesion/enunciate/examples/jaxrsjackson/genealogy/data/Relationship.java
./com/webcohesion/enunciate/examples/jaxrsjackson/genealogy/data/State.java

So - no api package, no PersonService nor PersonServiceImpl there (and, according to https://github.com/stoicflame/enunciate/wiki/Using-Client-Side, there should be sth like that).

Am I missing something?

Best, Bartek

stoicflame commented 8 years ago

The services are only generated for SOAP endpoints. Only model classes are generated for JSON.

I can imagine generating services for the REST endpoints (instead of SOAP endpoints), but that's a major enhancement. Would you like me to turn this issue into an enhancement request for that feature so it can be tracked?

stoicflame commented 7 years ago

This enhancement is currently seeking a sponsor. If anybody is willing to sponsor the work, reach out to me and I'd be happy to pick it up.