最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

json - WSO2 EI: MalformedUriTemplateException in Call Mediator with Dynamic URL - Stack Overflow

programmeradmin0浏览0评论

I am trying to iterate over a list of APIs, extract tokenEndpoint, client_id, and client_secret, and make a GET request to fetch a token using WSO2 EI. However, I am facing a deployment error when trying to use get-property() inside the of the mediator.

<iterate expression="json-eval($)">
<target>
<sequence>
<log level="custom">
<property expression="json-eval($.tokenEndpoint)" name="tokenEndpoint"/>
</log>
<!-- Extract API Credentials -->
<property expression="json-eval($.tokenEndpoint)" name="TokenEndpoint" scope="default" type="STRING"/>
<property expression="json-eval($.client_id)" name="client_id" scope="default" type="STRING"/>
<property expression="json-eval($.client_secret)" name="client_secret" scope="default" type="STRING"/>
<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"/>
<log level="full">
<property expression="get-property('tokenRequestUrl')" name="Final Token Request URL"/>
</log>
<!-- Call API -->
<call>
<endpoint>
<http method="GET" uri-template="{get-property('default', 'tokenRequestUrl')}">
 <suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>-1</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</http>
</endpoint>
</call>
</sequence>
</target>
</iterate>

However, I get the following error:

com.damnhandy.uri.template.MalformedUriTemplateException: The variable name get-property('default' contains invalid characters

发布评论

评论列表(0)

  1. 暂无评论