Apache camel 对Bean或模型类的Camel Restlet响应
我需要从另一个restlet到类对象的camel restlet。但是我越来越 org.apache.camel.converter.stream.CachedOutputStream$WrappedInputStream@12a7889 在生产过程中 调用camel:Apache camel 对Bean或模型类的Camel Restlet响应,apache-camel,restlet,Apache Camel,Restlet,我需要从另一个restlet到类对象的camel restlet。但是我越来越 org.apache.camel.converter.stream.CachedOutputStream$WrappedInputStream@12a7889 在生产过程中 调用camel: Future<Object> responseFuture = producer.asyncRequestBody("direct:fablertcatalogredirect", k1);
Future<Object> responseFuture = producer.asyncRequestBody("direct:fablertcatalogredirect", k1);
try {
Object obj = (Object)responseFuture.get(500, TimeUnit.SECONDS);
System.out.println("Future Output Value"+obj.toString());
System.out.println("Bytes : "+obj.getClass().getDeclaredMethods());
System.out.println(obj.getClass());
} catch (Exception e) {
e.printStackTrace();
}
如果我使用postman rest客户端运行这个,我可以得到JSON。但是这里我得到了
org.apache.camel.converter.stream.CachedOutputStream$WrappedInputStream
作为响应。在http调用之后,我不得不在路由中执行类似的操作
.convertBodyTo(String.class)
from("direct:fablertcatalogredirect").to("http://localhost:8093/FablertsCatalog/getresults");