Hi All, Im trying to send a simple JSON response when an API gets invoked, but I can only manage a SOAP envelope as the response, here is the synapse configuration,
<?xml version="1.0" encoding="UTF-8"?><api xmlns=" http://ws.apache.org/ns/synapse" name="HealthCheck_API" context="/check_health"> <resource methods="POST GET" url-mapping="/*"> <inSequence> <header name="To" action="remove"/> <property name="RESPONSE" value="true"/> <property name="NO_ENTITY_BODY" scope="axis2" action="remove"/> <payloadFactory media-type="json"> <format>{ "status": "okay" }</format> </payloadFactory> <property name="messageType" value="application/json" scope="axis2"/> <property name="ContentType" value="application/json" scope="axis2"/> <send/> </inSequence> </resource> </api> This what Im getting now, <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv=" http://www.w3.org/2003/05/soap-envelope "><soapenv:Body><status>okay</status></soapenv:Body></soapenv:Envelope> This is what I want, { "status": "okay" } What am I missing? Thanks -- Regards, Uvindra Mobile: 777733962
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
