Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 79617 invoked from network); 28 Apr 2008 04:27:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Apr 2008 04:27:01 -0000 Received: (qmail 82998 invoked by uid 500); 28 Apr 2008 04:27:02 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 82947 invoked by uid 500); 28 Apr 2008 04:27:02 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 82934 invoked by uid 99); 28 Apr 2008 04:27:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Apr 2008 21:27:02 -0700 X-ASF-Spam-Status: No, hits=4.1 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WEIRD_PORT,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Apr 2008 04:26:09 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1JqKwf-0005CG-8r for users@cxf.apache.org; Sun, 27 Apr 2008 21:26:29 -0700 Message-ID: <16930321.post@talk.nabble.com> Date: Sun, 27 Apr 2008 21:26:29 -0700 (PDT) From: Joshua Purcell To: users@cxf.apache.org Subject: Re: Question about JAX-RS Sub resources In-Reply-To: <16927448.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: joshua.purcell@gmail.com References: <16927448.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Your example is a little different from the sample JAX-RS code included with the CXF snapshot. This may work better for you: @Path("/userservice/") public class UserService { @Path("/users/{id}/") public User getUser(@PathParam("id") String id) { ... // load from db } } @XmlRootElement(name = "user") public class User { @GET @Path("orders/{orderId}") public Order getOrder(@PathParam("orderId") orderId) { } } This would change your endpoint URL to: http://localhost:9080/userservice/users/123/orders/456 scouredimage wrote: > > I am trying to use the sub resource functionality as follows: > > @Path("/users/") > public class UserService { > > @Path("/users/{id}/") > public User getUser(@PathParam("id") String id) { > ... // load from db > } > > ... > > } > > public class User { > > @Path("orders/{orderId}") > public Order getOrder(@PathParam("orderId") orderId) { > ... > } > > .. > } > > When I try to access http://localhost:9080/users/123/orders/456 , I get a > "No operation matching request path" fault. > > Any suggestions? > ----- Joshua Purcell -- View this message in context: http://www.nabble.com/Question-about-JAX-RS-Sub-resources-tp16927448p16930321.html Sent from the cxf-user mailing list archive at Nabble.com.