users@jersey.java.net

Subresources not responding to defined routes

From: Basmajian, Raffi <rbasmajian_at_oppenheimerfunds.com>
Date: Fri, 9 Jul 2010 16:37:03 -0400

I am trying to get a watered-down version of the Bookstore sample
project working without the JSP pages but with pure XML and JAXB
instead. I am able to access /items/{id}, but I can't get to the
/items/{}/track{} or /items/{}/tracks resource. Here is the code:
 
MusicResource Class
====================================================
@Produces("application/xml")
@Singleton
@Path ("/items")
public class MusicResource {
 
   @GET
   @Path("{cid}/")
   public CD getCD(@PathParam("cid") String cid){}
 
   @GET
   public List<CD> getCDs(){}

 
CD Class
====================================
@XmlRootElement
@Produces("application/xml")
@Singleton
public class CD {
        
    @GET
    @Path("tracks")
    public List<Track> getTracks() {}
    
    @GET
    @Path("track/{num}/")
    public Track getTrack(@PathParam("num") String tid) {}
           
 
I just can't figure out why "/items/{}/track/{}" or "/item/{}/tracks" is
not working. Am I missing an annotation or something?
 
Thank you,

------------------------------------------------------------------------------
This e-mail transmission may contain information that is proprietary, privileged and/or confidential and is intended exclusively for the person(s) to whom it is addressed. Any use, copying, retention or disclosure by any person other than the intended recipient or the intended recipient's designees is strictly prohibited. If you are not the intended recipient or their designee, please notify the sender immediately by return e-mail and delete all copies. OppenheimerFunds may, at its sole discretion, monitor, review, retain and/or disclose the content of all email communications.
==============================================================================