override sessionHandler using http:listener-config

你离开我真会死。 提交于 2019-12-24 14:34:17

问题


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>

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>

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


回答1:


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>

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



来源:https://stackoverflow.com/questions/33041725/override-sessionhandler-using-httplistener-config

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!