Class HessianMessageFormatter
- java.lang.Object
-
- org.apache.synapse.format.hessian.HessianMessageFormatter
-
- All Implemented Interfaces:
org.apache.axis2.transport.MessageFormatter
public class HessianMessageFormatter extends Object implements org.apache.axis2.transport.MessageFormatter
Enables a message encoded using the Hessian binary protocol to be written to transport by axis2/synapse and this formats the HessianDataSource to a Hessian message.- See Also:
MessageFormatter
,SynapseBinaryDataSource
-
-
Constructor Summary
Constructors Constructor Description HessianMessageFormatter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
formatSOAPAction(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, String soapAction)
Simply returns the soapAction unchanged.byte[]
getBytes(org.apache.axis2.context.MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format)
This method is not supported because of large file handling limitationsString
getContentType(org.apache.axis2.context.MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format, String soapActionString)
Formats the content type to be written in to the transportURL
getTargetAddress(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, URL targetURL)
void
writeTo(org.apache.axis2.context.MessageContext msgCtx, org.apache.axiom.om.OMOutputFormat format, OutputStream out, boolean preserve)
Extract Hessian bytes from the received SOAP message and write it onto the wire
-
-
-
Method Detail
-
getContentType
public String getContentType(org.apache.axis2.context.MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format, String soapActionString)
Formats the content type to be written in to the transport- Specified by:
getContentType
in interfaceorg.apache.axis2.transport.MessageFormatter
- Parameters:
msgCtxt
- message of which the content type has to be formattedformat
- fomat of the expected formatted messagesoapActionString
- soap action of the message- Returns:
- contentType formatted content type as a String
-
writeTo
public void writeTo(org.apache.axis2.context.MessageContext msgCtx, org.apache.axiom.om.OMOutputFormat format, OutputStream out, boolean preserve) throws org.apache.axis2.AxisFault
Extract Hessian bytes from the received SOAP message and write it onto the wire- Specified by:
writeTo
in interfaceorg.apache.axis2.transport.MessageFormatter
- Parameters:
msgCtx
- message from which the Hessian message has to be extractedformat
- message format to be writtenout
- stream to which the message is writtenpreserve
- whether to preserve the indentations- Throws:
org.apache.axis2.AxisFault
- in case of a failure in writing the message to the provided stream
-
getBytes
public byte[] getBytes(org.apache.axis2.context.MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format) throws org.apache.axis2.AxisFault
This method is not supported because of large file handling limitations- Specified by:
getBytes
in interfaceorg.apache.axis2.transport.MessageFormatter
- Parameters:
msgCtxt
- message which contains the Hessian message inside the HessianDataSourceformat
- message format to be written- Returns:
- Hessian binary bytes of the message
- Throws:
org.apache.axis2.AxisFault
- for any invocation
-
formatSOAPAction
public String formatSOAPAction(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, String soapAction)
Simply returns the soapAction unchanged.- Specified by:
formatSOAPAction
in interfaceorg.apache.axis2.transport.MessageFormatter
-
getTargetAddress
public URL getTargetAddress(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, URL targetURL) throws org.apache.axis2.AxisFault
- Specified by:
getTargetAddress
in interfaceorg.apache.axis2.transport.MessageFormatter
- Returns:
- A templated URL based on the given target URL.
- Throws:
org.apache.axis2.AxisFault
-
-