[jbosstools-issues] [JBoss JIRA] (JBIDE-18710) Invalid generated code in JAX-RS Endpoint
Xavier Coulon (JIRA)
issues at jboss.org
Fri Nov 21 09:21:39 EST 2014
[ https://issues.jboss.org/browse/JBIDE-18710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021946#comment-13021946 ]
Xavier Coulon commented on JBIDE-18710:
---------------------------------------
[~maxandersen],
What about generating this kind code instead of something that may not compile ?
{code}
@RequestScoped
@Path("/pojoes")
public class PojoEndpoint {
@POST
@Consumes({ "application/xml", "application/json" })
public Response create(final Pojo pojo) {
//TODO: process the given pojo
// you may want to return a Response using something like this:
//return Response.created(UriBuilder.fromResource(Pojo.class).path(String.valueOf(pojo.getId())).build()).build();
return null;
}
}
{code}
wdyt ?
> Invalid generated code in JAX-RS Endpoint
> -----------------------------------------
>
> Key: JBIDE-18710
> URL: https://issues.jboss.org/browse/JBIDE-18710
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: webservices
> Affects Versions: 4.2.0.Final
> Reporter: Xavier Coulon
> Assignee: Xavier Coulon
> Fix For: 4.2.1.Final, 4.3.0.Alpha1
>
>
> The generated code in the 'create' method contains something like this:
> {code}
> return Response.created(
> UriBuilder.fromResource(Session.class)
> .path(String.valueOf(session.getId())).build()).build();
> {code}
> but the {{Session.class}} should be {{SessionEndpoint.class}} since it must be the resource class annotated with {{@Path}}
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
More information about the jbosstools-issues
mailing list