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

后端 未结 1 973
野的像风
野的像风 2021-01-25 14:31

In my project I created some proxy.There transport type is tcp. My response is

{
 \"BillingSystem\": {
   \"request_id\": \"2011414008000001147         


        
相关标签:
1条回答
  • 2021-01-25 14:57

    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"/>)

    0 讨论(0)
提交回复
热议问题