【发布时间】:2012-04-03 03:41:31
【问题描述】:
我正在运行 servicemix 4.4.1。我正在尝试使用 camel-http4 对网站进行 http 调用。无论我尝试调用哪个网站,我都会收到此错误: org.apache.camel.RuntimeCamelException:org.apache.camel.component.http.HttpOperationFailedException:HTTP 操作调用http://servicemix.apache.org/downloads/servicemix-4.4.0.html 失败,状态码:405
这是我的代码 sn-p:
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="activemq://events1"/>
<setHeader headerName="CamelHttpMethod">
<constant>POST</constant>
</setHeader>
<to uri="http://servicemix.apache.org/downloads/servicemix-4.4.0.html"/>
<to uri="log:events"/>
</route>
</camelContext>
我尝试了许多网站并尝试使用不同的 http 方法(post 与 get),但我不断收到相同的错误。任何想法?提前致谢。
【问题讨论】:
标签: apache-camel apache-servicemix http-status-code-405