camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmoulliard <cmoulli...@gmail.com>
Subject Best strategy to by example authenticate a user based on file content before to process it ?
Date Wed, 09 Jul 2008 08:41:46 GMT

Hi,

I try to figure out what is the best strategy to by example authenticate a
user based on file content before to process the content of the file ?

The authentication process itself is not really important and may be
replaced by another logic (like validation, ....).

I'm not sure at all that I can do the full process in one route and probably
that I need to separate the part extracting the user of the file from the
next part of the route. Correct if I'm wrong ?

Idea :

from("file:///c:/temp")
.setProperty("userName").xpath("path to find in the XML file the username")
.to("direct:Authenticate");

from("direct:Authenticate")
.to("bean:authentication")
.choice().when(header("authenticated").isEqualTo(true)).to("direct:Unmarshallfile")
.otherwise.to("queue:rejectedMessage")

from("direct:UnmarshallFile")
.unmarshall().jaxb()
.to("queue:deliveredQueue")

Additional question : Can I place the three from ... to in one transaction ?

Regards,

Charles


-- 
View this message in context: http://www.nabble.com/Best-strategy-to-by-example-authenticate-a-user-based-on-file-content-before-to-process-it---tp18356949s22882p18356949.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message