| java.lang.Object org.apache.axis2.transport.http.MultipartFormDataFormatter
MultipartFormDataFormatter | public class MultipartFormDataFormatter implements MessageFormatter(Code) | | Formates the request message as multipart/form-data. An example of this serialization is shown
below which was extracted from the Web Services Description Language (WSDL) Version 2.0 Part 2: Adjuncts
The following instance data of an input message:
Fréjus
France
@@@@-@@-@@
with the following operation element
will serialize the message as follow:
Content-Type: multipart/form-data; boundary=AaB03x
Content-Length: xxx
--AaB03x
Content-Disposition: form-data; name="town"
Content-Type: application/xml
Fréjus
France
--AaB03x
Content-Disposition: form-data; name="date"
Content-Type: text/plain; charset=utf-8
--AaB03x--
|
Method Summary | |
public String | formatSOAPAction(MessageContext messageContext, OMOutputFormat format, String soapAction) | public byte[] | getBytes(MessageContext messageContext, OMOutputFormat format) | public String | getContentType(MessageContext messageContext, OMOutputFormat format, String soapAction) | public URL | getTargetAddress(MessageContext messageContext, OMOutputFormat format, URL targetURL) Some message formats may want to alter the target url. | public void | writeTo(MessageContext messageContext, OMOutputFormat format, OutputStream outputStream, boolean preserve) To support deffered writing transports as in http chunking.. |
formatSOAPAction | public String formatSOAPAction(MessageContext messageContext, OMOutputFormat format, String soapAction)(Code) | | this only if you want set a transport header for SOAP Action |
getBytes | public byte[] getBytes(MessageContext messageContext, OMOutputFormat format) throws AxisFault(Code) | | a byte array of the message formatted according to the givenmessage format. |
getContentType | public String getContentType(MessageContext messageContext, OMOutputFormat format, String soapAction)(Code) | | Different message formats can set their own content types
Eg: JSONFormatter can set the content type as application/json
Parameters: messageContext - Parameters: format - Parameters: soapAction - |
getTargetAddress | public URL getTargetAddress(MessageContext messageContext, OMOutputFormat format, URL targetURL) throws AxisFault(Code) | | Some message formats may want to alter the target url.
the target URL |
writeTo | public void writeTo(MessageContext messageContext, OMOutputFormat format, OutputStream outputStream, boolean preserve) throws AxisFault(Code) | | 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.
Parameters: outputStream - Parameters: preserve - :do not consume the OM when this is set.. |
|
|