When you have a REST endpoint starting with 'https://...' and an HTTP proxy configured at the same time with RESTEasy reference binding, then upon invoking the reference you'll see the following error:
Caused by: java.lang.IllegalStateException: Scheme 'http' not registered.
|
at org.apache.http.conn.scheme.SchemeRegistry.getScheme(SchemeRegistry.java:74)
|
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:156)
|
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)
|
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
|
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
|
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
|
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
|
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
|
at org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor.execute(ApacheHttpClient4Executor.java:182)
|
at org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:39)
|
at org.jboss.resteasy.plugins.interceptors.encoding.AcceptEncodingGZIPInterceptor.execute(AcceptEncodingGZIPInterceptor.java:40)
|
at org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:45)
|
at org.jboss.resteasy.client.ClientRequest.execute(ClientRequest.java:444)
|
at org.jboss.resteasy.client.ClientRequest.httpMethod(ClientRequest.java:688)
|
at org.switchyard.component.resteasy.util.ClientInvoker.invoke(ClientInvoker.java:453)
|
... 120 more
|
|