Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Some minor copy edits.

...

Name

Description

Example

Required?

default value

ResourcesClass

the The resource classes which you want to export as REST service

resourcesClass=org.apache.camel.rs.Example1,org.apache.camel.rs.Exchange2

yes Yes

NONE None

You can also configure the CXF REST endpoint through the spring configuration. Since there are lots of difference between the CXF REST client and CXF REST Server, we provides different configuration for them.
Please check out the schema file and CXF REST user guide for more information.

...

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. All you need to do in Camel is delegate this method request to a right processor or endpoint.

...

CXF JAXRS front end implements a proxy based Client API, with this API you can invoke the remote REST service through a proxy.
camel-cxfrs producer is based on this proxy API.
So, you just need to specify the operation name in the message header and prepare the parameter in the message body, camel-cxfrs producer will generate right REST request for you.

...