camel-users mailing list archives

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

Hi,

I have a class, which contains a java object(say message which I need to
transmit).
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) {
     validate(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
MessageExchange.

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
application. http://old.nabble.com/file/p28179266/ExecuteOperation.png
ExecuteOperation.png 

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: http://old.nabble.com/How-to-change-java-application-into-Enterprise-Integration-Pattern-tp28179266p28179266.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message