您好,我通过 Carbon Studio 创建了以下类调解器:
package my.mediation;
import org.apache.synapse.MessageContext;
import org.apache.synapse.mediators.AbstractMediator;
public class Auth extends AbstractMediator {
public boolean mediate(MessageContext context) {
// TODO Implement your mediation logic here
context.setProperty("message","hello world!" );
return true;
}
}
顺序如下:
<inSequence xmlns="http://ws.apache.org/ns/synapse">
<property name="message" value="nothing" scope="default" />
<class name="my.mediation.Auth" />
<log>
<property name="Message******" expression="get-property('message')" />
</log>
</inSequence
> 问题是它总是打印文本“nothing”而不是打印 Message: "HelloWorld"...有什么建议吗?