org.apache.axis2.json
Class JSONBadgerfishMessageFormatter

java.lang.Object
  extended by org.apache.axis2.json.JSONMessageFormatter
      extended by org.apache.axis2.json.JSONBadgerfishMessageFormatter
All Implemented Interfaces:
MessageFormatter

public class JSONBadgerfishMessageFormatter
extends JSONMessageFormatter

This JSONBadgerfishMessageFormatter is the formatter for "Badgerfish" formatted JSON in Axis2. Eg: <out><in>mapped JSON</in></out> is converted to... {"out":{"in":{"$":"mapped JSON"}}} This can be used when you want to send messages with namespaces with JSON


Constructor Summary
JSONBadgerfishMessageFormatter()
           
 
Method Summary
protected  javax.xml.stream.XMLStreamWriter getJSONWriter(java.io.OutputStream outStream)
           
protected  java.lang.String getStringToWrite(org.apache.axiom.om.OMDataSource dataSource)
          If the data source is a "Badgerfish" formatted data source, gives the JSON string by directly taking from the data source.
 
Methods inherited from class org.apache.axis2.json.JSONMessageFormatter
formatSOAPAction, getBytes, getContentType, getTargetAddress, writeTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONBadgerfishMessageFormatter

public JSONBadgerfishMessageFormatter()
Method Detail

getJSONWriter

protected javax.xml.stream.XMLStreamWriter getJSONWriter(java.io.OutputStream outStream)
Overrides:
getJSONWriter in class JSONMessageFormatter

getStringToWrite

protected java.lang.String getStringToWrite(org.apache.axiom.om.OMDataSource dataSource)
If the data source is a "Badgerfish" formatted data source, gives the JSON string by directly taking from the data source.

Overrides:
getStringToWrite in class JSONMessageFormatter
Parameters:
dataSource - data source to be checked
Returns:
the JSON string to write


Copyright © 2007 Apache Web Services Project. All Rights Reserved.