使用http:listener-config覆盖sessionHandler [英] override sessionHandler using http:listener-config

查看:103
本文介绍了使用http:listener-config覆盖sessionHandler的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要以这种方式迁移在ule子3.3.1中定义的http NoSessionConnector :

I need to migrate a http NoSessionConnector defined in mule 3.3.1 in this way:

<http:connector name="NoSessionConnector">
    <service-overrides sessionHandler="org.mule.session.NullSessionHandler" />
</http:connector>

到新的http:listener-config,但是我不能将 service-overrides 放在http:listener-config标记内,也不能放在http:listener标记内.两种配置均不允许:

to the new http:listener-config but I cannot put service-overrides inside http:listener-config tag nor inside http:listener tag. Both configurations are not permitted:

<http:listener-config name="httpListener" host="localhost">
    <service-overrides sessionHandler="org.mule.session.NullSessionHandler" />
</http:listener-config>

<http:listener config-ref="httpListener" path="/ecommerce/*">
    <service-overrides sessionHandler="org.mule.session.NullSessionHandler" />
</http:listener>

有没有一种方法可以在Mule 3.7.0中配置自定义sessionHandler?我需要它避免此 stackoverflow 中所述的OptionalDataException

is there a way to configure a custom sessionHandler in mule 3.7.0? I need it to avoid a OptionalDataException as described on this stackoverflow

推荐答案

如果问题是作为HTTP标头过去的消息属性"MULE_SESSION",则可以尝试将其从消息的出站范围中删除避免将"MULE_SESSION"作为HTTP标头发送.您可以使用"message-property-transformer"元素来做到这一点:

If the problem is the message property "MULE_SESSION" that is past as HTTP header, then you can try removing it from the outbound scope of the message in order to avoid sending "MULE_SESSION" as HTTP header. You can do it by using the "message-property-transformer" element:

<message-properties-transformer scope="outbound">
    <delete-message-property key="MULE_SESSION" />
</message-properties-transformer>

请记住,您必须将其放置在流中的SOAP调用之前.

Remember that you have to place it before the SOAP call in the flow.

这篇关于使用http:listener-config覆盖sessionHandler的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆