0
基於FTP2組件,路由定義很簡單。來自駱駝交換體的文件對象在駱駝FTP中爲空
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)