Package org.apache.axis2.kernel.http
Class SOAPMessageFormatter
- java.lang.Object
-
- org.apache.axis2.kernel.http.SOAPMessageFormatter
-
- All Implemented Interfaces:
MessageFormatter
public class SOAPMessageFormatter extends Object implements MessageFormatter
-
-
Constructor Summary
Constructors Constructor Description SOAPMessageFormatter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
formatSOAPAction(MessageContext msgCtxt, OMOutputFormat format, String soapActionString)
String
getContentType(MessageContext msgCtxt, OMOutputFormat format, String soapActionString)
Different message formats can set their own content types Eg: JSONFormatter can set the content type as application/jsonURL
getTargetAddress(MessageContext msgCtxt, OMOutputFormat format, URL targetURL)
Some message formats may want to alter the target url.void
writeTo(MessageContext msgCtxt, OMOutputFormat format, OutputStream out, boolean preserve)
To support deffered writing transports as in http chunking..
-
-
-
Method Detail
-
writeTo
public void writeTo(MessageContext msgCtxt, OMOutputFormat format, OutputStream out, 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 msgCtxt, OMOutputFormat format, String soapActionString)
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
-
formatSOAPAction
public String formatSOAPAction(MessageContext msgCtxt, OMOutputFormat format, String soapActionString)
- Specified by:
formatSOAPAction
in interfaceMessageFormatter
- Returns:
- this only if you want set a transport header for SOAP Action
-
getTargetAddress
public URL getTargetAddress(MessageContext msgCtxt, 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
-
-