79438546

Date: 2025-02-14 06:42:34
Score: 0.5
Natty:
Report link

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'), '&amp;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'), '&amp;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

Reasons:
  • Blacklisted phrase (0.5): medium.com
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Kalindu Gandara