0
设置存储在filenet中的文档的文档类的简单测试在camel-cmis 2.16.2中有效。下面是路由Camel-cmis - 元数据设置错误
from("file://C:/Target/DMS/").process(new Processor() {
@Override
public void process(Exchange e) throws Exception {
e.getIn().getHeaders().put(PropertyIds.CONTENT_STREAM_MIME_TYPE, "application/pdf; charset=UTF-8");
e.getIn().getHeaders().put(CamelCMISConstants.CMIS_FOLDER_PATH, "/Test");
e.getIn().getHeaders().put("cmis:objectTypeId", "doc_Test");
e.getIn().getHeaders().put(PropertyIds.NAME, e.getIn().getHeader(Exchange.FILE_NAME));
}
}).to("cmis://http://test:9080/fncmis/resources/Service?repositoryId=TEST_REPO&username=TEST&password=RAW(TEST)");
当我检查文档类文件存储在IBM FileNet的 - 我可以看到文档类作为测试(符号名:doc_Test)。但是,当我再补充一点类的参数值ATLEAST一个像下面
e.getOut().getHeaders().put("prp_Field1","TestValue1");
即时得到NoSuchHeaderException的参数“CMIS:名字”,我已经设置,你可以看到上面的路线。这是设置元数据参数的正确方法吗?
查看关于使用getOut VS getIn此FAQ:http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html –