public class MessageFormatterExAdapter extends Object implements MessageFormatterEx
MessageFormatterEx interface to an
existing MessageFormatter.
It implements the MessageFormatterEx.getDataSource(MessageContext, OMOutputFormat, String) method
using MessageFormatter.getBytes(MessageContext, OMOutputFormat) and
MessageFormatter.getContentType(MessageContext, OMOutputFormat, String).| Constructor and Description |
|---|
MessageFormatterExAdapter(MessageFormatter messageFormatter) |
| Modifier and Type | Method and Description |
|---|---|
String |
formatSOAPAction(MessageContext messageContext,
org.apache.axiom.om.OMOutputFormat format,
String soapAction) |
byte[] |
getBytes(MessageContext messageContext,
org.apache.axiom.om.OMOutputFormat format) |
String |
getContentType(MessageContext messageContext,
org.apache.axiom.om.OMOutputFormat format,
String soapAction)
Different message formats can set their own content types
Eg: JSONFormatter can set the content type as application/json
|
DataSource |
getDataSource(MessageContext messageContext,
org.apache.axiom.om.OMOutputFormat format,
String soapAction)
Get the formatted message as a
DataSource object. |
URL |
getTargetAddress(MessageContext messageContext,
org.apache.axiom.om.OMOutputFormat format,
URL targetURL)
Some message formats may want to alter the target url.
|
void |
writeTo(MessageContext messageContext,
org.apache.axiom.om.OMOutputFormat format,
OutputStream outputStream,
boolean preserve)
To support deffered writing transports as in http chunking..
|
public MessageFormatterExAdapter(MessageFormatter messageFormatter)
public DataSource getDataSource(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, String soapAction) throws AxisFault
MessageFormatterExDataSource object.getDataSource in interface MessageFormatterExAxisFaultpublic String formatSOAPAction(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, String soapAction)
formatSOAPAction in interface MessageFormatterpublic byte[] getBytes(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format) throws AxisFault
getBytes in interface MessageFormatterAxisFaultpublic String getContentType(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, String soapAction)
MessageFormattergetContentType in interface MessageFormatterpublic URL getTargetAddress(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, URL targetURL) throws AxisFault
MessageFormattergetTargetAddress in interface MessageFormatterAxisFaultpublic void writeTo(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, OutputStream outputStream, boolean preserve) throws AxisFault
MessageFormatterwriteTo in interface MessageFormatterpreserve - :
do not consume the OM when this is set..AxisFaultCopyright © 2004–2018 The Apache Software Foundation. All rights reserved.