【发布时间】:2022-09-23 21:19:24
【问题描述】:
我正在尝试从我的骆驼路线呼叫休息邮政服务。 其余服务部署在https://csp-verteileauftrag-camunda-v1-csp-ims-dev-az.apcn.osp4-preprod.hel.kko.ch/api/v1/verteileauftrag/。 如果尾部有斜杠(在 verteileauftrag 之后),则从 VS Code 之类的 Rest 客户端调用服务可以工作。
在我的骆驼路线中,我配置了以下内容:
restConfiguration().host(\"https://csp-verteileauftrag-camunda-v1-csp-ims-dev-az.apcn.osp4-preprod.hel.kko.ch/api/v1\").component(\ "http\").bindingMode(RestBindingMode.json);
然后稍后使用配置: .to(\"rest:post:verteileauftrag?outType=ch.helsana.csp.verteileauftrag.rest.model.apiadapter.ResponseType\")
如果我执行代码,我会从后端收到 404 HTTP 错误,因为使用的 URL 是
https://csp-verteileauftrag-camunda-v1-csp-ims-dev-az.apcn.osp4-preprod.hel.kko.ch/api/v1/verteileauftrag。所以没有尾随斜杠。
我试图像 .to(\"rest:post:verteileauftrag/?outType=ch.helsana.csp.verteileauftrag.rest.model.apiadapter.ResponseType\") 这样添加它
但没有成功。 您知道如何告诉其余配置中的 http 组件如何添加斜杠吗? 非常感谢。 使用redhat fuse 7_10_2。
问候米歇尔
标签: apache-camel