camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wagnermarques <>
Subject Sharing a solution for discussion
Date Wed, 15 May 2013 03:03:18 GMT
Hello camel riders,

I would like to share a solution and ask if it was the best aproach. 
I think it can be util for some one in the future and because is a
interesting example of integration using camel!

The use case:
I have a orbeon forms installed that was configured to: 1) save the form
date to existdb and 2) after it, send metadata of the form to my camel route
described below. With the camel route, with the metadate of the form
submited (using camel-http) the route interact with existdb rest api to get
the real date of the form.

Ok, it is a simplification of the use case, because next step is improve it
with business rules upon form metadata and start a business process deployed
in apache ode. But start the process from the route is not implemented yet
and not described here.

That is the code (sorry for much comments)

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""

	<cxf:rsServer id="rsRestServices_OrbeonServer"
		serviceClass="" />

	<camelContext xmlns="">
		<route id="FZLBPMS_CAMEL_ROUTE___cxfrs_bean_rsRestServices_OrbeonServer">
			<from uri="cxfrs:bean:rsRestServices_OrbeonServer" />
		    <to uri="Handle_App_e_FormTitle_camming_from_orbeonformPROCESSOR"/>
		     <setHeader headerName="CamelHttpUri">
		       <inOut uri="http://doesnt.matter.we/override/it/anyways" />						

	<bean id="messageInspectProcessor"
class="" />

	<bean id="Handle_App_e_FormTitle_camming_from_orbeonformPROCESSOR"
		class="" />

	<bean id="BuildResponseProcessor"
class="" />


This processor is important to distinct what data is camming from witch form
by filling the values of the headers:

public class Pega_dados_do_formularioPROCESSOR implements Processor{

	public void process(Exchange exchange) throws Exception {
		String camelHttpQuery =
		String[] split = camelHttpQuery.split("&");
		String[] appParam = split[0].split("=");
		String app = appParam[1];

		String[] formParam = split[1].split("=");
		String form = formParam[1];
		String[] dataParam = split[2].split("=");
		String dataId = dataParam[1];
		exchange.getIn().setHeader("fzlbpms_orbeon_app", app);
		exchange.getIn().setHeader("fzlbpms_orbeon_form", form);
		exchange.getIn().setHeader("fzlbpms_orbeon_dataId", dataId);


I still have several problems and doubts, like basic autentications for
example, but for now I just would like to share and to ask about if it was a
good aproach of this kind of integration (if it is relevant in some sense).


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message