org.apache.axis2.transport.http
Class SOAPMessageFormatter
java.lang.Object
org.apache.axis2.transport.http.SOAPMessageFormatter
- All Implemented Interfaces:
- MessageFormatter
public class SOAPMessageFormatter
- extends java.lang.Object
- implements MessageFormatter
Method Summary |
java.lang.String |
formatSOAPAction(MessageContext msgCtxt,
org.apache.axiom.om.OMOutputFormat format,
java.lang.String soapActionString)
|
byte[] |
getBytes(MessageContext msgCtxt,
org.apache.axiom.om.OMOutputFormat format)
|
java.lang.String |
getContentType(MessageContext msgCtxt,
org.apache.axiom.om.OMOutputFormat format,
java.lang.String soapActionString)
Different message formats can set their own content types
Eg: JSONFormatter can set the content type as application/json |
java.net.URL |
getTargetAddress(MessageContext msgCtxt,
org.apache.axiom.om.OMOutputFormat format,
java.net.URL targetURL)
Some message formats may want to alter the target url. |
void |
writeTo(MessageContext msgCtxt,
org.apache.axiom.om.OMOutputFormat format,
java.io.OutputStream out,
boolean preserve)
To support deffered writing transports as in http chunking.. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SOAPMessageFormatter
public SOAPMessageFormatter()
writeTo
public void writeTo(MessageContext msgCtxt,
org.apache.axiom.om.OMOutputFormat format,
java.io.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 interface MessageFormatter
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:
getBytes
in interface MessageFormatter
- Returns:
- a byte array of the message formatted according to the given
message format.
- Throws:
AxisFault
getContentType
public java.lang.String getContentType(MessageContext msgCtxt,
org.apache.axiom.om.OMOutputFormat format,
java.lang.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 interface MessageFormatter
formatSOAPAction
public java.lang.String formatSOAPAction(MessageContext msgCtxt,
org.apache.axiom.om.OMOutputFormat format,
java.lang.String soapActionString)
- Specified by:
formatSOAPAction
in interface MessageFormatter
- Returns:
- this only if you want set a transport header for SOAP Action
getTargetAddress
public java.net.URL getTargetAddress(MessageContext msgCtxt,
org.apache.axiom.om.OMOutputFormat format,
java.net.URL targetURL)
throws AxisFault
- Description copied from interface:
MessageFormatter
- Some message formats may want to alter the target url.
- Specified by:
getTargetAddress
in interface MessageFormatter
- Returns:
- the target URL
- Throws:
AxisFault
Copyright © 2007 Apache Web Services Project. All Rights Reserved.