Search code examples
esbmule

How to configure Mule CE to send HTTP request through corporate proxy?


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!


Solution

  • The proxy parameters are configured on the http:connector element as shown in the HTTP transport configuration reference.