cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin" <sergey.beryoz...@iona.com>
Subject Re: Duplicated @path in service classes
Date Wed, 17 Sep 2008 11:24:14 GMT
Hi

I think you may need to do it like this :

@Path("bar")
public class Resource1 {

@GET
public Response get() {}
//etc
}

@Path("bar/")
public class Resource2 {

@GET
public Response get() {}
@POST
@Path("foo")
public void post() {}
}

All requests (GET, POST, etc) ending with just /bar will be directed to Resource1, the requests
which have /bar/* will be directed 
to Resource2.

Cheers, Sergey

>
> I had a set of jax-rs services deployed using CXF2.1 (relying upon
> jsr311-api-0.6.jar) using a single web-application. Some of the service
> resource classes share the same @path value. This worked alright in CXF2.1.
> I upgraded to CXF2.1.2 (using jsr311-api-0.8.jar) to avail the
> ExceptionMapper feature in order to return http response status for 404 on
> certain GET methods. The ExceptionMapper functionality works fine, however
> some of the services are now throwing 'No operation matching request path'
> for service requests with the duplicated path definitions. Is there a way to
> run multiple service implementation classes using the same @path value?
>
> Thanks
> Sri
> -- 
> View this message in context: http://www.nabble.com/Duplicated-%40path-in-service-classes-tp19520472p19520472.html
> Sent from the cxf-user mailing list archive at Nabble.com. 

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Mime
View raw message