Table of Contents
The Camel service relies on the OSGi bundles of Camel. It uses iPOJO to provides services on the OSGi gateway.
The service implementation contains a wrapper of a Camel context, which is instantiated by the service when an application requires one. This wrapper contains :
Example :
this.from("registry:cxfEndpoint")
will be a lot easier to write than
this.from("cxf://http://localhost:9000/SayHello?serviceClass=org.ow2.jonas.samples.camel.example.cxf.webservice.
api.ISayHello&dataFormat=POJO")
These entries are set from an xml file, that matches the following XSD :
<schema targetNamespace="org.ow2.jonas.samples.camel.registry.impl.file:FileRegistry"
elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="org.ow2.jonas.samples.camel.registry.impl.file:FileRegistry">
<element name="registry" type="tns:registry"></element>
<complexType name="registry">
<sequence maxOccurs="unbounded" minOccurs="0">
<element name="entry" type="tns:entry"></element>
</sequence>
</complexType>
<complexType name="entry">
<sequence maxOccurs="1" minOccurs="1">
<element name="logicalName" type="string"></element>
<element name="technicalName" type="string"></element>
</sequence>
</complexType>
</schema>
Therefore, the file that allows the developer to use the previous example is :
<registry xmlns="org.ow2.jonas.samples.camel.registry.impl.file:FileRegistry"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="org.ow2.jonas.samples.camel.registry.impl.file:FileRegistry FileRegistry.xsd">
<entry>
<logicalName>cxfEndpoint</logicalName>
<technicalName>
<![CDATA[
cxf://
http://localhost:9000/SayHello?
serviceClass=org.ow2.jonas.samples.camel.example.cxf.webservice.api.ISayHello&
dataFormat=POJO
] ]>
</technicalName>
</entry>
</registry>