Hi William, William Tam wrote: >> CXF JAXRS front end implements the JAXRS(JSR311) API, so we can export the >> resources classes as a REST service. And we leverage the CXF Invoker API to >> turn a REST request into a normal Java object method invocation. >> Unlike the camel-restlet, you don't need to specify the URI template within >> your restlet endpoint, CXF take care of the REST request URI to resource >> class method mapping according to the JSR311 specification. > > I am not clear how to get the request object from the exchange. Could > you clarify it?
Each validity REST request will be mapped to a method call of the resources class's instance. Current camel-cxfrs consumer just take this call from the CxfRsInvoker and pass it to the Camel processors. You can find more detail information in the CxfRsInvoker.java[1] > >> All you need to do in Camel is delegate this method request to a right >> processor or >> endpoint. > > The processor/endpoint that I delegated to may need to know "metadata" > (such as verb, path, URI templates parameters, media type, etc). Are > these information available in the exchange? > No, you can't get these information for camel-cxfrs consumer. > Thanks. > [1] http://svn.apache.org/repos/asf/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsInvoker.java Cheers, Willem