camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbeer Kadian <>
Subject How to change java application into Enterprise Integration Pattern
Date Thu, 08 Apr 2010 14:19:56 GMT


I have a class, which contains a java object(say message which I need to
This class is present in an OSGI Bundle named connector.
This OSGI Bundle also contains classes need to validate this message.
There is another OSGI Bundle which contains a transformer class which can
convert this java object message into XML Message using Apache velocity.
The XML Message need to be converted into a Soap message, but the
information required to convert it
into soap message is present in the bundle named connector.

Now the control is inside connector bundle, and I have that java object
message ready.
If i have to do the operations mentioned above in a java application, i may
have done it as follows
Pseudo code:
1) call a validation method and send the java object as a parameter.
2) If the validation passes, call the transform method of the Transformer
class, and get the xml as reply.
3) Get the required information to build soapmessage and convert it into
soap message.

sendJavaObject(Object message) {
     String xmlMessage = Transformer.transform(message);
     String soapMessage = appendSoapInfo(xmlMessage);

But the thing here is that all the controlling of method calling is
happening from the Connector bundle.
If I see an Camel Integration pattern they will tell some thing like this
Object Message ----->>>>>  Validator ---->>>>> Transformer ---->>>>
soapAppender --->>>> callWebservice.

and then the response will be sent using the out property present in the

But my implementation looks like this
Object Message   ----->>>>>> Validator
Object Message  ------>>>>>> Transformer
String Message  ------->>>>>  SoapAppender
String soapMessage ---->>>>> Call Web Service using camel Http Component
----->>>> String soapResponse

I am also adding a diagram giving pictorial representation of our

Please give me some guidelines regarding how to change a java application
into Enterprise Integration Patterns.

With Regards
Harbeer Kadian

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

View raw message