Package org.apache.axis2.format
Class BinaryFormatter
- java.lang.Object
-
- org.apache.axis2.format.BinaryFormatter
-
- All Implemented Interfaces:
MessageFormatterEx
,MessageFormatter
public class BinaryFormatter extends Object implements MessageFormatterEx
-
-
Constructor Summary
Constructors Constructor Description BinaryFormatter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
formatSOAPAction(MessageContext messageContext, OMOutputFormat format, String soapAction)
String
getContentType(MessageContext messageContext, OMOutputFormat format, String soapAction)
Different message formats can set their own content types Eg: JSONFormatter can set the content type as application/jsonDataSource
getDataSource(MessageContext messageContext, OMOutputFormat format, String soapAction)
Get the formatted message as aDataSource
object.URL
getTargetAddress(MessageContext messageContext, OMOutputFormat format, URL targetURL)
Some message formats may want to alter the target url.void
writeTo(MessageContext messageContext, OMOutputFormat format, OutputStream outputStream, boolean preserve)
To support deffered writing transports as in http chunking..
-
-
-
Method Detail
-
writeTo
public void writeTo(MessageContext messageContext, OMOutputFormat format, OutputStream outputStream, boolean preserve) throws AxisFault
Description copied from interface:MessageFormatter
To support deffered writing transports as in http chunking.. Axis2 was doing this for some time.. Preserve flag can be used to preserve the envelope for later use. This is usefull when implementing authentication machnisms like NTLM.- Specified by:
writeTo
in interfaceMessageFormatter
preserve
- : do not consume the OM when this is set..- Throws:
AxisFault
-
getContentType
public String getContentType(MessageContext messageContext, OMOutputFormat format, String soapAction)
Description copied from interface:MessageFormatter
Different message formats can set their own content types Eg: JSONFormatter can set the content type as application/json- Specified by:
getContentType
in interfaceMessageFormatter
-
getTargetAddress
public URL getTargetAddress(MessageContext messageContext, OMOutputFormat format, URL targetURL) throws AxisFault
Description copied from interface:MessageFormatter
Some message formats may want to alter the target url.- Specified by:
getTargetAddress
in interfaceMessageFormatter
- Returns:
- the target URL
- Throws:
AxisFault
-
formatSOAPAction
public String formatSOAPAction(MessageContext messageContext, OMOutputFormat format, String soapAction)
- Specified by:
formatSOAPAction
in interfaceMessageFormatter
- Returns:
- this only if you want set a transport header for SOAP Action
-
getDataSource
public DataSource getDataSource(MessageContext messageContext, OMOutputFormat format, String soapAction) throws AxisFault
Description copied from interface:MessageFormatterEx
Get the formatted message as aDataSource
object.- Specified by:
getDataSource
in interfaceMessageFormatterEx
- Returns:
- Throws:
AxisFault
-
-