Reputation: 1063
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.
Upvotes: 0
Views: 672
Reputation: 1330
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
Upvotes: 1
Reputation: 4001
You can use the following property.
<property name="messageType" value="application/json" scope="axis2"/>
Upvotes: 1