Hi,
I am using the NON SPRING CXF-2.2.2 REST implementaion. My web.xml looks
like this:
===================================================================
<servlet>
<servlet-name>CXFServlet</servlet-name>
<display-name>CXF Servlet</display-name>
<servlet-class>
org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet
</servlet-class>
<init-param>
<param-name>jaxrs.serviceClasses</param-name>
<param-value>
com.rest.BaseRestResourceClass
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/catalogue/*</url-pattern>
</servlet-mapping>
===================================================================
Now as shown ablove all requests with URIs like (example):
/catalogue/123/add/x
/catalogue/314/search/y
/catalogue/256/delete/z
are delegated to the "BaseRESTResourceClass" and respective methods are
called for different URIs .
Problem: I want to have different resource classes for different patterned
URIs like:
/catalogue/123/add/* ---> AddResourceClass
/catalogue/123/search/* ---> SearchResourceClass
/catalogue/123/delete/* ---> DeleteResourceClass
Is there a way to do this(delegation) in the BaseRESTResourceClass or
otherwise ?
P.S: I thought of doing it in the web.xml itself, but, as we know, it
doesn't allow the specific patterns like:
-----------------------------------------------------------
<servlet-mapping>
<servlet-name>Addition_CXFServlet</servlet-name>
<url-pattern>/catalogue/*/add/*</url-pattern>
</servlet-mapping>
-----------------------------------------------------------
<servlet-mapping>
<servlet-name>Deletion_CXFServlet</servlet-name>
<url-pattern>/catalogue/*/delete/*</url-pattern>
</servlet-mapping>
-----------------------------------------------------------
Thanks.
--
View this message in context:
http://www.nabble.com/Delegating-REST-request-to-sub-resource-classes----tp26026208p26026208.html
Sent from the cxf-user mailing list archive at Nabble.com.