Package org.apache.synapse.commons.json
Class JsonStreamFormatter
- java.lang.Object
-
- org.apache.synapse.commons.json.JsonStreamFormatter
-
- All Implemented Interfaces:
org.apache.axis2.transport.MessageFormatter
public final class JsonStreamFormatter extends Object implements org.apache.axis2.transport.MessageFormatter
-
-
Constructor Summary
Constructors Constructor Description JsonStreamFormatter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringformatSOAPAction(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat omOutputFormat, String s)byte[]getBytes(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format)StringgetContentType(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, String soapActionString)URLgetTargetAddress(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, URL targetURL)static voidtoJson(org.apache.axis2.context.MessageContext messageContext, OutputStream out)voidwriteTo(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, OutputStream out, boolean preserve)
-
-
-
Method Detail
-
getBytes
public byte[] getBytes(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format) throws org.apache.axis2.AxisFault- Specified by:
getBytesin interfaceorg.apache.axis2.transport.MessageFormatter- Throws:
org.apache.axis2.AxisFault
-
getContentType
public String getContentType(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, String soapActionString)
- Specified by:
getContentTypein interfaceorg.apache.axis2.transport.MessageFormatter
-
writeTo
public void writeTo(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, OutputStream out, boolean preserve) throws org.apache.axis2.AxisFault- Specified by:
writeToin interfaceorg.apache.axis2.transport.MessageFormatter- Throws:
org.apache.axis2.AxisFault
-
toJson
public static void toJson(org.apache.axis2.context.MessageContext messageContext, OutputStream out) throws org.apache.axis2.AxisFault- Parameters:
messageContext- Axis2 Message context that holds the JSON/XML payload.out- Output stream to which the payload(JSON) must be written.- Throws:
org.apache.axis2.AxisFault
-
getTargetAddress
public URL getTargetAddress(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, URL targetURL) throws org.apache.axis2.AxisFault
- Specified by:
getTargetAddressin interfaceorg.apache.axis2.transport.MessageFormatter- Throws:
org.apache.axis2.AxisFault
-
-