Package org.apache.synapse.commons.json
Class JsonFormatter
- java.lang.Object
-
- org.apache.synapse.commons.json.JsonFormatter
-
- All Implemented Interfaces:
org.apache.axis2.transport.MessageFormatter
public final class JsonFormatter extends Object implements org.apache.axis2.transport.MessageFormatter
-
-
Constructor Summary
Constructors Constructor Description JsonFormatter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
formatSOAPAction(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 omOutputFormat)
String
getContentType(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, String soapActionString)
URL
getTargetAddress(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat omOutputFormat, URL url)
static void
toJson(org.apache.axiom.om.OMElement element, OutputStream outputStream)
void
writeTo(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat omOutputFormat, OutputStream outputStream, boolean preserve)
-
-
-
Method Detail
-
getBytes
public byte[] getBytes(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat omOutputFormat) throws org.apache.axis2.AxisFault
- Specified by:
getBytes
in interfaceorg.apache.axis2.transport.MessageFormatter
- Throws:
org.apache.axis2.AxisFault
-
writeTo
public void writeTo(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat omOutputFormat, OutputStream outputStream, boolean preserve) throws org.apache.axis2.AxisFault
- Specified by:
writeTo
in interfaceorg.apache.axis2.transport.MessageFormatter
- Throws:
org.apache.axis2.AxisFault
-
toJson
public static void toJson(org.apache.axiom.om.OMElement element, OutputStream outputStream) throws org.apache.axis2.AxisFault
- Parameters:
element
- XML elementoutputStream
- Output Stream to write the converted JSON representation.- 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:
getContentType
in interfaceorg.apache.axis2.transport.MessageFormatter
-
getTargetAddress
public URL getTargetAddress(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat omOutputFormat, URL url) throws org.apache.axis2.AxisFault
- Specified by:
getTargetAddress
in interfaceorg.apache.axis2.transport.MessageFormatter
- Throws:
org.apache.axis2.AxisFault
-
-