I cannot find a way to make the mail:host binding a variable in the switchyard.xml.
I try something like the following.
<mail:host>$%7Bsmtp.mail.host%7D</mail:host>
and then I set smtp.mail.host in a properties file.
I've also tried with double brackets, etc. Everytime I use a variable I get :-
Caused by: java.lang.IllegalArgumentException: host must be specified and not empty
the system property (smtp.mail.host) exists and I can log it to the logs but it never gets picked up in proceesing. Other variables like path properties in the file bindings work.
If I use a fixed-value then the mail works. But this means I have to change it between deploying between test and production systems. This is not practical.
thanks, Graeme
The correct answer was ${smtp.mail.host}. That is using dollar with curly braces. I thought I had tried this and where I got confused is that in the file bindings $ with curly braces does not work. There you have to use the Hex representation of the braces. I don't know why but that is another question. Thanks for the answer David.
So you've tried this (dollar open-curly, property name, close-curly)?
<mail:host>${smtp.mail.host}</mail:host>
In what I see above, you have $%7B and %7D (which are different characters) surrounding your property name.