public abstract class AbstractJSONMessageFormatter extends java.lang.Object implements MessageFormatter
| Constructor and Description |
|---|
AbstractJSONMessageFormatter() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
formatSOAPAction(MessageContext msgCtxt,
org.apache.axiom.om.OMOutputFormat format,
java.lang.String soapActionString) |
byte[] |
getBytes(MessageContext msgCtxt,
org.apache.axiom.om.OMOutputFormat format)
Gives the JSON message as an array of bytes.
|
java.lang.String |
getContentType(MessageContext msgCtxt,
org.apache.axiom.om.OMOutputFormat format,
java.lang.String soapActionString) |
protected abstract javax.xml.stream.XMLStreamWriter |
getJSONWriter(java.io.Writer writer) |
protected abstract 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.
|
java.net.URL |
getTargetAddress(MessageContext msgCtxt,
org.apache.axiom.om.OMOutputFormat format,
java.net.URL targetURL) |
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.
|
public java.lang.String getContentType(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format, java.lang.String soapActionString)
getContentType in interface MessageFormatterpublic byte[] getBytes(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format) throws AxisFault
getBytes in interface MessageFormattermsgCtxt - 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 java.lang.String formatSOAPAction(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format, java.lang.String soapActionString)
formatSOAPAction in interface MessageFormatterprotected abstract javax.xml.stream.XMLStreamWriter getJSONWriter(java.io.Writer writer)
protected abstract java.lang.String getStringToWrite(org.apache.axiom.om.OMDataSource dataSource)
dataSource - data source to be checkedpublic void writeTo(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format, java.io.OutputStream out, boolean preserve) throws AxisFault
writeTo in interface MessageFormattermsgCtxt - 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.public java.net.URL getTargetAddress(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format, java.net.URL targetURL) throws AxisFault
getTargetAddress in interface MessageFormatterAxisFaultCopyright © 2004-2024 The Apache Software Foundation. All Rights Reserved.