[jbosstools-issues] [JBoss JIRA] (JBIDE-15550) Endpoint from Resource Locator and Subresources don't appear in the Project Explorer

Xavier Coulon (JIRA) jira-events at lists.jboss.org
Wed Oct 2 09:39:02 EDT 2013


     [ https://issues.jboss.org/browse/JBIDE-15550?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xavier Coulon updated JBIDE-15550:
----------------------------------

    Description: 
Take the 2 following classes:

{code}
@Path("/products")
public class ProductResourceLocator {

	@PathParam("productType") 
	private String productType = null;
	
	@Path("/{productType}")
	public Object getProductResourceLocator() {
		if ("books".equals(productType)) {
			return new BookResource(); 
		}
		if ("games".equals(productType)) {
			return new GameResource();
		}
		throw new WebApplicationException(Status.NOT_FOUND);
	}

}
{code}

and

{code}
public class BookResource {

	@GET
	@Path("/{id}")
	@Produces({ "application/xml", "application/json" })
	public Book getProduct(@PathParam("id") Integer id) {
		return null;
	}
}

{code} 

The combination of those 2 classes should produce the following endpoint:
{code}
/<rest_app>/products/{productType:String};bar={String}/{id:int}
{code}
but *sometimes*, this endpoint is missing and running a 'Project>Clean' does not solve the problem.

  was:
Take the 2 following classes:

{code}
@Path("/products")
public class ProductResourceLocator {

	@PathParam("productType") 
	private String productType = null;
	
	@Path("/{productType}")
	public Object getProductResourceLocator() {
		if ("books".equals(productType)) {
			return new BookResource(); 
		}
		if ("games".equals(productType)) {
			return new GameResource();
		}
		throw new WebApplicationException(Status.NOT_FOUND);
	}

}
{code}

and

{code}
public class BookResource {

	@GET
	@Path("/{id}")
	@Produces({ "application/xml", "application/json" })
	public Book getProduct(@PathParam("id") Integer id) {
		return null;
	}
}

{code} 

The combination of those 2 classes should produce the following endpoint:
/<rest_app>/products/{productType:String};bar={String}/{id:int}

but *sometimes*, this endpoint is missing and running a 'Project>Clean' does not solve the problem.


    
> Endpoint from Resource Locator and Subresources don't appear in the Project Explorer
> ------------------------------------------------------------------------------------
>
>                 Key: JBIDE-15550
>                 URL: https://issues.jboss.org/browse/JBIDE-15550
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: webservices
>    Affects Versions: 4.1.0.Final
>            Reporter: Xavier Coulon
>            Assignee: Xavier Coulon
>             Fix For: 4.1.1.Beta1, 4.2.0.Alpha1
>
>
> Take the 2 following classes:
> {code}
> @Path("/products")
> public class ProductResourceLocator {
> 	@PathParam("productType") 
> 	private String productType = null;
> 	
> 	@Path("/{productType}")
> 	public Object getProductResourceLocator() {
> 		if ("books".equals(productType)) {
> 			return new BookResource(); 
> 		}
> 		if ("games".equals(productType)) {
> 			return new GameResource();
> 		}
> 		throw new WebApplicationException(Status.NOT_FOUND);
> 	}
> }
> {code}
> and
> {code}
> public class BookResource {
> 	@GET
> 	@Path("/{id}")
> 	@Produces({ "application/xml", "application/json" })
> 	public Book getProduct(@PathParam("id") Integer id) {
> 		return null;
> 	}
> }
> {code} 
> The combination of those 2 classes should produce the following endpoint:
> {code}
> /<rest_app>/products/{productType:String};bar={String}/{id:int}
> {code}
> but *sometimes*, this endpoint is missing and running a 'Project>Clean' does not solve the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list