Package org.apache.axis2.transport.http
Class SOAPMessageFormatter
java.lang.Object
org.apache.axis2.transport.http.SOAPMessageFormatter
- All Implemented Interfaces:
MessageFormatter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformatSOAPAction(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format, String soapActionString) byte[]getBytes(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format) getContentType(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format, String soapActionString) Different message formats can set their own content types Eg: JSONFormatter can set the content type as application/jsongetTargetAddress(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format, URL targetURL) Some message formats may want to alter the target url.voidwriteTo(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format, OutputStream out, boolean preserve) To support deffered writing transports as in http chunking..
-
Constructor Details
-
SOAPMessageFormatter
public SOAPMessageFormatter()
-
-
Method Details
-
writeTo
public void writeTo(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format, OutputStream out, boolean preserve) throws AxisFault Description copied from interface:MessageFormatterTo 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:
writeToin interfaceMessageFormatter- Parameters:
out-preserve- : do not consume the OM when this is set..- Throws:
AxisFault
-
getBytes
public byte[] getBytes(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format) throws AxisFault - Specified by:
getBytesin interfaceMessageFormatter- Returns:
- a byte array of the message formatted according to the given message format.
- Throws:
AxisFault
-
getContentType
public String getContentType(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format, String soapActionString) Description copied from interface:MessageFormatterDifferent message formats can set their own content types Eg: JSONFormatter can set the content type as application/json- Specified by:
getContentTypein interfaceMessageFormatter- Parameters:
msgCtxt-format-soapActionString-
-
formatSOAPAction
public String formatSOAPAction(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format, String soapActionString) - Specified by:
formatSOAPActionin interfaceMessageFormatter- Returns:
- this only if you want set a transport header for SOAP Action
-
getTargetAddress
public URL getTargetAddress(MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format, URL targetURL) throws AxisFault Description copied from interface:MessageFormatterSome message formats may want to alter the target url.- Specified by:
getTargetAddressin interfaceMessageFormatter- Returns:
- the target URL
- Throws:
AxisFault
-