【发布时间】:2021-06-25 14:43:46
【问题描述】:
我有一个关于 Camel 路由的基本问题。假设我有以下路线:
from(amq:MyQueue).process("jmsToHttp4").to("http4://dummyhost:8080").to("file://out/MyFolder");
假设 http4-Response 只是一个字符串“Your Response”。据我了解文档,可以通过以下方式检索“您的回复”:
exchange.getOut().getBody()
假设我只想写“file://out/MyFolder”,前提是响应包含“Response”一词。我怎样才能做到这一点?
还有一个问题: 如果我想在 Spring 环境中编写测试,如何使用“Your Response positive test”和“Your negative test”来模拟响应?不知何故,我需要能够在 exchange.out.body 中编写响应字符串,对吗?
谢谢,
哈迪
【问题讨论】: