how to send response as String using class mediator in wso2 esb

混江龙づ霸主 提交于 2019-12-02 06:24:38

Change your payloadFactory like this :

<payloadFactory>
    <format>
        <text xmlns="http://ws.apache.org/commons/ns/payload">$1</text>
    </format>
    <args>
        <arg evaluator="xml" expression="$ctx:responseClientValue"/>
</payloadFactory>

Change property messageType like this :

<property name="messageType" scope="axis2" type="STRING" value="text/plain"/> 

(see axis2.xml, by default, the PlainTextFormatter class is associated with text/plain : <messageFormatter contentType="text/plain" class="org.apache.axis2.format.PlainTextFormatter"/>)

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