0
votes

Using WSO2 Enterprise Integrator 6.6.0, is there a way to always return a JSON instead of an XML without adding a "Accept: Application/json" header?

I tried to add a node

<property description="output_content" name="ContentType" scope="axis2" type="STRING" value="application/json"/>

in the sequence, but with no avail.

2

2 Answers

1
votes

You can use the following property.

<property name="messageType" value="application/json" scope="axis2"/>
1
votes

The property ContentType will take effect only with property messageType, so you need both like below:

<property name="messageType" value="application/json" scope="axis2"/>
<property name="ContentType" value="application/json" scope="axis2"/>

This messageType property is responsible for used message formater on output. You can read more in this WSO2 documentation Property messageType