<int-sftp:outbound-gateway id="sftpOutBound"
session-factory="sftpSessionFactory" expression="payload" command="put" request-channel="outboundFtpChannel"
remote-directory="/tmp/tsiftp" reply-channel="sftpReplyChannel"/>
with the above xml, i can send files and get reply . In java, how to set the remote directory in SftpOutboundGateway .If I use SftpMessageHandler,is there any possibility to get reply.Commented code is transferring files but no reply.
@Bean
@ServiceActivator(inputChannel = "outboundFtpChannel")
public MessageHandler transfertoPeopleSoft(){
/* SftpMessageHandler handler = new SftpMessageHandler(sftpSessionFactory());
handler.setRemoteDirectoryExpression(new LiteralExpression("/tmp/tsiftp"));
return handler;*/
SftpOutboundGateway sftpOutboundGateway = new SftpOutboundGateway( sftpSessionFactory(), "put", "/tmp/tsiftp");
sftpOutboundGateway.setOutputChannelName("sftpReplyChannel");
return sftpOutboundGateway;
}
Exception I am getting is
exception is org.springframework.expression.spel.SpelParseException: Expression [/tmp/tsiftp] @0: EL1070E: Problem parsing left operand
Thanks for your help.