To demonstrate the usage and deployment of a Camel route within Talend ESB using Eclipse, we'll use
Camel's camel-example-cxf-osgi example, located within the
examples/apache/camel folder of the Talend ESB distribution.
Refer to the following steps:
Use a Camel route
Procedure
From a command-line window, navigate to this folder and type mvn clean
install eclipse:eclipse. This will create an Eclipse project out of this
sample that can be imported into Eclipse.
From the Eclipse menu, select File : Import..., and from the
Import popup, choose Existing Projects into
Workspace (see below). Click Next.
Example
For the root directory navigate to the
examples/apache/camel/camel-example-cxf-osgi folder and
select the camel-example-cxf-osgi example from the
Projects list.
Click Finish, you will see it in the Eclipse Package
Explorer. (Optional) You can open the project source files and look at the code (this
example is explained on the Apache Camel site at http://camel.apache.org/cxf-example-osgi.html.)
As this example runs in the Talend Runtime Container,
the container needs to be started prior to running it. Navigate to the
<TalendRuntimePath>/container/bin folder and enter
trun.bat or ./trun. Enter the following commands
at the resulting console to install the example:
Open a web browser and make sure you can view the above web service WSDL at
http://localhost:8040/services/camel-example-cxf-osgi/webservices/incident?wsdl before continuing.
A SOAP call needs to be made using SoapUI. Make sure you have already installed
SoapUI in Eclipse as discussed in Development Environment Setup
(standalone SoapUI is also fine.) From Eclipse, select Menu Item Window > Show View > Other..., and select soapUI Navigator from the
View list:
Example
Create a new project called camel-example-cxf-osgi. Point to
the following url:
http://localhost:8181/cxf/camel-example-cxf-osgi/webservices/incident?wsdl
In the soapUI Navigator view, open Request
1 under camel-example-cxf-osgi > ReportIncidentBinding > ReportIncident and copy and paste the following SOAP Message:
Press the green arrow in the soapUI navigator to make the SOAP call.
In the Navigator View, you can see the SOAP response
stating that the incident report was accepted. Additionally, if you check the new
target/inbox folder under the
camel-example-cxf-osgi sample directory, you can see that a
file was created storing the SOAP request, completing the Camel route.
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!