This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | RESTful Java client Incorrect code generation - Produces and consumes content-types are mismatching | ||
---|---|---|---|
Product: | webservices | Reporter: | vidhyadharantechdays <vidhyadharantechdays> |
Component: | REST | Assignee: | Milan Kuchtiak <mkuchtiak> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.1 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
vidhyadharantechdays
2016-04-04 07:13:08 UTC
Similarly this has failed for me. I was using the following tutorial resource, and did an autogenerate of a restful client to test netbeans functionality. https://github.com/koushikkothagal/messenger Pointing it at the message resource it failed to create the get functions correctly. Example is shown below for getMessage, but getMessages did the same. It created: public <T> T getMessage(Class<T> responseType, String messageId) throws ClientErrorException { WebTarget resource = webTarget; resource = resource.path(java.text.MessageFormat.format("{0}", new Object[]{messageId})); return resource.get(responseType); } Instead of: public <T> T getMessage(Class<T> responseType, String messageId) throws ClientErrorException { WebTarget resource = webTarget; resource = resource.path(java.text.MessageFormat.format("{0}", new Object[]{messageId})); return resource.request(MediaType.APPLICATION_JSON).get(responseType); } |