how to use URI-VARIABLE for port number
Goal is to provide a variable port number for the following outbound http gateway.
<int-http:outbound-gateway id="httpOutboundGateway"
url="http://{myHost}:{myPort}/services/{myPath}?{myQuery}"
... >
<int-http:uri-variable name="myHost" expression="headers['X-CUSTOM-PROVIDER-HOSTNAME']" />
<int-http:uri-variable name="myPort" expression="headers['X-CUSTOM-PROVIDER-PORT']" />
<int-http:uri-variable name="myPath" expression="headers['X-CUSTOM-PROVIDER-PATH']" />
<int-http:uri-variable name="myQuery" expression="headers['X-CUSTOM-PROVIDER-QUERY']" />
</int-http:outbound-gateway>
Three of the four URI-VARIABLES work fine - except myPort.
Supplied port number is always translated as part of the path (ie http://myHost/myPort/..). Digging into SI v3.1.2.RELEASE code, I find the org.springframework.web.util.UriComponentBuilder class responsible for translating my token URI. The class has a regex pattern for port that looks for digits (PORT_PATTERN = (\\d*) ). Fine if a number is supplied, but it doesn't appear to allow for a variable port number in the form of '{token}'.
Can I do the port replacement in the URI?
thanks