0
Dans mule 3.3.0 CE, j'ajouter ces lignes dans mon fichier XML de configuration:choix de contrôle de flux
<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>
Quand je lance mon projet, et entrez thisurl: localhost: 8081/priorité ou localhost: 8081/normal J'ai cette erreur:
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
Comment puis-je résoudre ce problème?