Skip to content

Commit

Permalink
use system properties when making requests, allowing proxy configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jvanzadelhoff committed Feb 11, 2022
1 parent 2d81a59 commit b56c5b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ public class HttpAwareUriResolver extends XsltUriResolver {
private final static Logger LOG = LogManager.getLogger(HttpAwareUriResolver.class);

private static HttpClient httpClient = HttpClients.custom()
.setConnectionManager(new PoolingHttpClientConnectionManager()).build();
.setConnectionManager(new PoolingHttpClientConnectionManager())
.useSystemProperties()
.build();
private ProducerTemplate template;
private CamelContext context;

Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/camel-oai-pmh.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
</otherwise>
</choice>
<!-- Replaced dynamically with the target catalog URL -->
<to uri="http:https://dummy?httpClient.SocketTimeout=180000"/>
<to uri="http:https://dummy?httpClient.SocketTimeout=180000&amp;useSystemProperties=true"/>
<!-- transform the GetRecordsResponse -->
<choice>
<when>
Expand Down Expand Up @@ -201,7 +201,7 @@
<setHeader name="CamelHttpMethod">
<constant>POST</constant>
</setHeader>
<to uri="http:https://dummy?httpClient.SocketTimeout=180000"/>
<to uri="http:https://dummy?httpClient.SocketTimeout=180000&amp;useSystemProperties=true"/>
</route>

<!-- route for INSPIRE catalogs via SOAP 1.1 -->
Expand Down Expand Up @@ -282,7 +282,7 @@
</otherwise>
</choice>
<!-- Replaced dynamically with the target catalog URL -->
<to uri="http:https://dummy?httpClient.SocketTimeout=180000"/>
<to uri="http:https://dummy?httpClient.SocketTimeout=180000&amp;useSystemProperties=true"/>
<!-- transform the GetRecordsResponse -->
<choice>
<when>
Expand Down Expand Up @@ -442,7 +442,7 @@
<!--<removeHeader name="resumptionToken"/>-->

<!-- Replaced dynamically with the target catalog URL -->
<to uri="http:https://dummy?httpClient.SocketTimeout=180000"/>
<to uri="http:https://dummy?httpClient.SocketTimeout=180000&amp;useSystemProperties=true"/>
<!-- transform the csw -->
<convertBodyTo type="java.lang.String"/>
<setHeader name="json">
Expand Down

0 comments on commit b56c5b8

Please sign in to comment.