Hi,
I was able to get it to work. I'm not sure if this is best practice, but
here is what my route now looks like
FlatpackDataFormat df = new FlatpackDataFormat();
df.setDefinition(new
ClassPathResource("META-INF/smooks/fuintegration/retirement-fixed-width-mapping.xml"));
df.setFixed(true);
df.setIgnoreFirstRecord(false);
from(memberRepositoryEndPoint)
.to("log:org.fuwt?level=INFO")
.routeId("retirement_file_generation")
.marshal(df)
.convertBodyTo(String.class)
.log("log:org.fuwt?level=ERROR&showAll=false")
.to(localFileEndPoint);
from(localFileEndPoint)
.process(new Processor() {
public void process(Exchange exchange) throws Exception
{
Properties properties = new Properties();
properties.load(this.getClass().getResourceAsStream("/default.fu-integration.properties"));
String inFilePath =
properties.getProperty("retirement.outgoing_file.dir").concat(fileName);
String outFilePath =
properties.getProperty("retirement.encrypted_outgoing_file.dir").concat(fileName);
String pubKeyPath =
properties.getProperty("retirement.miliman.pubkeypath");
Security.addProvider(new BouncyCastleProvider());
FUPGPUtils.encrypt(inFilePath, pubKeyPath,
outFilePath);
}
});
from(encryptedFileEndPoint)
.to("log:org.fuwt?level=INFO")
.routeId("miliman_sftp_exchange")
.to(sftpFileEndPoint);
Many thanks for your help
Sam
--
View this message in context:
http://camel.465427.n5.nabble.com/GPG-encryption-in-camel-2-8-3-tp5448999p5451035.html
Sent from the Camel - Users mailing list archive at Nabble.com.