简体   繁体   English

迭代器中介计数器 esb wso2

[英]Iterator mediator counter esb wso2

I'm using the iterate mediator for calculate the sum of a note variable i tried with the script mediator but when i send the api in postman for test we takes a long time without answer and i have this error:我正在使用迭代调解器来计算我尝试使用脚本调解器的音符变量的总和,但是当我在 postman 中发送 api 进行测试时,我们花了很长时间没有得到答案,我有这个错误:

ERROR {PassThroughNHttpGetProcessor} - Unable to find axis service for service name : studenttest/getsomme

here is my code:这是我的代码:

<resource methods="GET" uri-template="/gettotal">
        <inSequence>
            <property expression="$url:nom" name="uri.var.nom" scope="default" type="STRING"/>
            <call>
                <endpoint>
                    <http method="get" uri-template="http://ITMTNF3RRJSJ:8290/services/studenttest/getsomme?nom={uri.var.nom}">
                        <suspendOnFailure>
                            <initialDuration>-1</initialDuration>
                            <progressionFactor>-1</progressionFactor>
                            <maximumDuration>0</maximumDuration>
                        </suspendOnFailure>
                        <markForSuspension>
                            <retriesBeforeSuspension>0</retriesBeforeSuspension>
                        </markForSuspension>
                    </http>
                </endpoint>
            </call>
            <property name="it_count" scope="operation" type="STRING" value="0"/>
            <iterate expression="//symbols/symbol" sequential="TRUE">
                <target>
                    <sequence>
                        <property expression="json-eval($.note)" name="note" scope="default" type="STRING"/>
                        <script language="js"><![CDATA[var note = mc.getProperty('note');
 var totalnote =it_count+note;
 mc.setProperty('it_count', totalnote);]]></script>
                </sequence>
                </target>
            </iterate>
            <respond/>
        </inSequence>
        <outSequence/>
        <faultSequence/>
    </resource>
</api>

This error "Unable to find axis service for service name" is a known issue[1] when a data service is invoked as a Rest service with query parameters in MI-1.2.0 and this is already fixed in MI-1.2.0 with the latest updates.当数据服务作为 Rest 服务在 MI-1.2.0 中使用查询参数调用时,此错误“无法找到服务名称的轴服务”是一个已知问题 [1],这已在 MI-1.2.0 中修复最新更新。 If you have a valid wso2 subscription you can get the latest updates using the Update 2.0 tool[2].如果您有有效的 wso2 订阅,您可以使用 Update 2.0 工具[2] 获取最新更新。

However, you can invoke the data service in soap manner or rest manner without query parameters and check the mediation.但是可以通过soap方式或者rest方式不带查询参数调用数据服务,检查中介。

[1] https://github.com/wso2/micro-integrator/issues/2351 [1] https://github.com/wso2/micro-integrator/issues/2351

[2] https://updates.docs.wso2.com/en/latest/ [2] https://updates.docs.wso2.com/en/latest/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM