如何配置 Mule CE 通过企业代理发送 HTTP 请求?
我正在学习 Mule ESB CE。我正在尝试第一个示例,Google 拼写检查器。一切似乎都很好,除了 HTTP 请求无法通过公司代理(或者我认为是这样)。我收到此错误:
Exception stack is:
1. connect timed out (java.net.SocketTimeoutException)
java.net.DualStackPlainSocketImpl:-2 (null)
2. The host did not accept the connection within timeout of 10000 ms (org.apache.commons.httpclient.ConnectTimeoutException)
org.apache.commons.httpclient.protocol.ReflectionSocketFactory:155 (null)
3. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=http://www.google.com:80/tbproxy/spell?lang=en, connector=HttpConnector
Mule Studio 中的代理设置似乎没问题,它使用了 Windows 7 代理设置;我可以尝试运行更新或安装新软件,它可以连接到 Mule 网站。当我从浏览器访问 Google 拼写检查器 URL 时,会收到正确的消息(错误,但这是预期的)。
我没有看到在 HTTP 端点设置中配置代理的方法。
所以,我唯一可以怀疑的是 Mule 引擎的代理设置。我的假设正确吗?如果是,我该如何设置代理?如果没有,我需要做什么?
谢谢!
I am learning Mule ESB CE. I am trying the very first example, the Google Spell Checker. Everything seems to be OK, except that the HTTP request cannot go through the corporate proxy (or so I think). I get this error:
Exception stack is:
1. connect timed out (java.net.SocketTimeoutException)
java.net.DualStackPlainSocketImpl:-2 (null)
2. The host did not accept the connection within timeout of 10000 ms (org.apache.commons.httpclient.ConnectTimeoutException)
org.apache.commons.httpclient.protocol.ReflectionSocketFactory:155 (null)
3. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=http://www.google.com:80/tbproxy/spell?lang=en, connector=HttpConnector
The proxy settings in Mule Studio seems to be OK, it used the Windows 7 proxy settings; I can try to run an update or install new software, it can connect to the Mule website. O get proper message (an error, but it's expected) when I access the Google spell checker URL from browser.
I did not see a way to configure the proxy in the HTTP endpoint settings.
So, the only thing I can suspect is the proxy settings of the Mule engine. Am I correct assuming this? If yes, how can I set the proxy? If not, what do I need to do?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
代理参数在 http:connector 元素上配置,如 HTTP 传输配置参考。
The proxy parameters are configured on the http:connector element as shown in the HTTP transport configuration reference.