在 mule 3.3.0 CE 中,我在配置 XML 文件中添加了这些行:
<flow name="muleService" doc:name="muleService">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/>
<choice doc:name="Choice">
<when expression="payload.get('type') == 'normal'" evaluator="groovy">
<processor-chain>
<component class="com.mule.routing.routingClass1" doc:name="Java"/>
</processor-chain>
</when>
<when expression="payload.get('type') == 'priority'" evaluator="groovy">
<processor-chain>
<component class="com.mule.routing.routingClass2" doc:name="Java"/>
</processor-chain>
</when>
<otherwise>
<processor-chain>
<component class="com.mule.routing.routingClass1" doc:name="DefaultQueue"/>
</processor-chain>
</otherwise>
</choice>
当我运行我的项目并输入此url:localhost:8081/priority 或 localhost:8081/normal 我有这个错误:
javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: java.lang.String.get() is applicable for argument types: (java.lang.String) values: [type]
Possible solutions: getAt(java.lang.String), grep(), next(), next(), getAt(groovy.lang.Range), getAt(groovy.lang.Range) (org.mule.api.MuleRuntimeException). Message payload is of type: String
我该如何解决这个问题?