Reputation: 23
I'm using Camel 2.18.1 and have a http4 route similar to
<to id="Http4Endpoint" uri="https4://{{servicename}}?sslContextParameters=mySslContext"/>
{{servicename}} is loaded via BridgePropertyPlaceholderConfigurer so that I can specify the endpoint in different environments.
The problem that I have just run into is that some of my test environments aren't https and the route fails as it seems to be trying to force https communication.
I've previously used jetty producers where you could specify http or https in {{ servicename }} and it auto-negotiated it however http4 seems to only allow the hostname:port.
How can I manage the localisation between different environments so that it will work with either a http or https endpoint?
Thanks
Upvotes: 0
Views: 508
Reputation: 55540
You can use more placeholders in the uri, so you can just have another option to configure if its http or https.
Upvotes: 0