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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformatSOAPAction(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 limitationsgetContentType(org.apache.axis2.context.MessageContext msgCtxt, org.apache.axiom.om.OMOutputFormat format, String soapActionString) Formats the content type to be written in to the transportgetTargetAddress(org.apache.axis2.context.MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, URL targetURL) voidwriteTo(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
-
Constructor Details
-
HessianMessageFormatter
public HessianMessageFormatter()
-
-
Method Details
-
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:
getContentTypein 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:
writeToin 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:
getBytesin 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:
formatSOAPActionin 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:
getTargetAddressin interfaceorg.apache.axis2.transport.MessageFormatter- Returns:
- A templated URL based on the given target URL.
- Throws:
org.apache.axis2.AxisFault
-