ルート定義は、FTP2 コンポーネントに基づいて単純です。
Endpoint[sftp://server.com:22//path/to/file/?consumer.delay=900000&password=xxxxxx&username=user]
FTP フォルダからファイルを読み込もうとしています。
JAXBContext jaxBContext = JAXBContext.newInstance(ObjectFactory.class);
Unmarshaller unmarshaller = jaxBContext.createUnmarshaller();
File authBatchFile = exchange.getIn().getBody(File.class);
AuthorizationFeed batchAuthFeed = (AuthorizationFeed) JAXBIntrospector
.getValue(unmarshaller.unmarshal(authBatchFile));
取引所には必要なものがすべて揃っています
Body [Body is file based: RemoteFile[fileName.txt]]
ヘッダーには、ファイルのサイズCamelFileLength=81612も表示されます。ただし、交換トレースの直後に以下の例外が発生します。
java.lang.IllegalArgumentException: The value for the "java.io.File" parameter cannot be null.
at com.ibm.xml.xlxp2.jaxb.unmarshal.AbstractUnmarshallerImpl.reportNullParameter(AbstractUnmarshallerImpl.java:180)
at com.ibm.xml.xlxp2.jaxb.unmarshal.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:72)
at com.wellpoint.clihub.hie.um.camel.processor.BatchCFFProcessor.process(BatchCFFProcessor.java:47)