Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-15550

Endpoint from Resource Locator and Subresources don't appear in the Project Explorer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • 4.1.1.CR1, 4.2.0.Alpha1
    • 4.1.0.Final
    • webservices
    • None

      Take the 2 following classes:

      @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);
      	}
      
      }
      

      and

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

      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.

            xcoulon@redhat.com Xavier Coulon
            xcoulon@redhat.com Xavier Coulon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: