|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageFormatter
MessageFormatter implementations are used by Axis2 to support serialization of messages to different message formats. (Eg: JSON). Users can register MessageFormatter implementations against a message type using the axis2.xml. Message type for a message can be specified by setting the "messageType" property in the MessageContext. This can also be given as a parameter in the service.xml/axis2.xml for a per service based/engine wide configuration.
Method Summary | |
---|---|
java.lang.String |
formatSOAPAction(MessageContext messageContext,
org.apache.axiom.om.OMOutputFormat format,
java.lang.String soapAction)
|
byte[] |
getBytes(MessageContext messageContext,
org.apache.axiom.om.OMOutputFormat format)
|
java.lang.String |
getContentType(MessageContext messageContext,
org.apache.axiom.om.OMOutputFormat format,
java.lang.String soapAction)
Different message formats can set their own content types Eg: JSONFormatter can set the content type as application/json |
java.net.URL |
getTargetAddress(MessageContext messageContext,
org.apache.axiom.om.OMOutputFormat format,
java.net.URL targetURL)
Some message formats may want to alter the target url. |
void |
writeTo(MessageContext messageContext,
org.apache.axiom.om.OMOutputFormat format,
java.io.OutputStream outputStream,
boolean preserve)
To support deffered writing transports as in http chunking.. |
Method Detail |
---|
byte[] getBytes(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format) throws AxisFault
AxisFault
void writeTo(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, java.io.OutputStream outputStream, boolean preserve) throws AxisFault
outputStream
- preserve
- :
do not consume the OM when this is set..
AxisFault
java.lang.String getContentType(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, java.lang.String soapAction)
messageContext
- format
- soapAction
- java.net.URL getTargetAddress(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, java.net.URL targetURL) throws AxisFault
AxisFault
java.lang.String formatSOAPAction(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, java.lang.String soapAction)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |