public class JSONStreamFormatter extends AbstractJSONMessageFormatter
| Constructor and Description |
|---|
JSONStreamFormatter() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes(MessageContext msgCtxt,
org.apache.axiom.om.OMOutputFormat format)
Gives the JSON message as an array of bytes.
|
protected javax.xml.stream.XMLStreamWriter |
getJSONWriter(java.io.Writer writer) |
protected java.lang.String |
getStringToWrite(org.apache.axiom.om.OMDataSource dataSource)
If the data source is a "Mapped" formatted data source, gives the JSON string by directly
taking from the data source.
|
void |
writeTo(MessageContext msgCtxt,
org.apache.axiom.om.OMOutputFormat format,
java.io.OutputStream out,
boolean preserve)
Writes the JSON message to the output stream with the correct convention.
|
formatSOAPAction, getContentType, getTargetAddresspublic byte[] getBytes(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format) throws AxisFault
AbstractJSONMessageFormattergetBytes in interface MessageFormattergetBytes in class AbstractJSONMessageFormattermsgCtxt - Message context which contains the soap envelope to be writtenformat - format of the message, this is ignoredAxisFault - if there is an error in writing the message using StAX writer or IF THE
USER TRIES TO SEND A JSON MESSAGE WITH NAMESPACES USING THE "MAPPED"
CONVENTION.public void writeTo(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format, java.io.OutputStream out, boolean preserve) throws AxisFault
AbstractJSONMessageFormatterwriteTo in interface MessageFormatterwriteTo in class AbstractJSONMessageFormattermsgCtxt - Message context which contains the soap envelope to be writtenformat - format of the message, this is ignoredout - output stream to be written in topreserve - ignoredAxisFault - if there is an error in writing the message using StAX writer or IF THE
USER TRIES TO SEND A JSON MESSAGE WITH NAMESPACES USING THE "MAPPED"
CONVENTION.protected javax.xml.stream.XMLStreamWriter getJSONWriter(java.io.Writer writer)
getJSONWriter in class AbstractJSONMessageFormatterprotected java.lang.String getStringToWrite(org.apache.axiom.om.OMDataSource dataSource)
AbstractJSONMessageFormattergetStringToWrite in class AbstractJSONMessageFormatterdataSource - data source to be checkedCopyright © 2004-2023 The Apache Software Foundation. All Rights Reserved.