How to configure cxf component to use proxy?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to configure cxf component to use proxy?

gangaaloori
Hi Camel Experts,

I'd like to know how and where to configure cxf component to use proxy. I'm using cxf component to invoke a web service which is hosted on the internet and is behind our corporate proxy. I'm afraid if there is no such way as of now. My Camel version is - 2.12.2.

I might get around this issue by providing the proxy details to the jvm or etc which in my opinion is not a good idea as it affects all my other routes as well. I'm looking out for this config per endpoint

As of now I am facing the following exception which I presume is due to proxy config issue. Thanks in advance

Caused by: java.io.IOException: IOException invoking https://xxxx.yyy.com/v1_0/receiver: Unable to tunnel through proxy. Proxy returns "HTTP/1.0 503 Service Unavailable"
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1339)
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1323)
        at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:50)
        at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:223)
        at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:628)
        at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        ... 50 more

Thanks,
Ganga Aloori
Thanks,
Ganga Aloori