In URI templates, you cannot use get-property
directly. To use a property value in a URI template, you must format it correctly as {uri.var.propertyName}
.
change the following property definition:
<property expression="concat(get-property('TokenEndpoint'), '?client_id=', get-property('client_id'), '&client_secret=', get-property('client_secret'))"
name="tokenRequestUrl"
scope="default"
type="STRING"/>
to:
<property expression="concat(get-property('TokenEndpoint'), '?client_id=', get-property('client_id'), '&client_secret=', get-property('client_secret'))"
name="uri.var.tokenRequestUrl"
scope="default"
type="STRING"/>
Additionally, update the http
element:
Change:
<http method="GET" uri-template="{get-property('default', 'tokenRequestUrl')}">
to:
<http method="GET" uri-template="{uri.var.tokenRequestUrl}">
For more information - http://medium.com/@Jenananthan/wso2-esb-construct-dynamic-urls-67fad2f6d34c