public class RelayUtils
extends java.lang.Object
Constructor and Description |
---|
RelayUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
buildMessage(org.apache.axis2.context.MessageContext msgCtx) |
static void |
buildMessage(org.apache.axis2.context.MessageContext messageContext,
boolean earlyBuild) |
static void |
buildMessage(org.apache.axis2.context.MessageContext messageContext,
boolean earlyBuild,
java.io.InputStream in) |
static void |
consumeAndDiscardMessage(org.apache.axis2.context.MessageContext msgContext)
Consumes the data in pipe completely in the given message context and discard it
|
static java.lang.String |
getMIMEContentType(java.lang.String contentType)
Get MIME content type out of content-type header
|
static boolean |
isDeleteRequestWithoutPayload(org.apache.axis2.context.MessageContext msgContext)
Function to check whether the processing request (enclosed within MessageContext) is a DELETE request without
entity body since we allow to have payload for DELETE requests, we treat same as POST.
|
static boolean |
isEmptyPayloadStream(java.io.InputStream inputStream)
Function to check given inputstream is empty or not
Used to check whether content of the payload input stream is empty or not
|
static boolean |
shouldOverwriteContentType(org.apache.axis2.context.MessageContext msgContext,
TargetRequest request)
Check whether the we should overwrite the content type for the outgoing request.
|
public static void buildMessage(org.apache.axis2.context.MessageContext msgCtx) throws java.io.IOException, javax.xml.stream.XMLStreamException
java.io.IOException
javax.xml.stream.XMLStreamException
public static void buildMessage(org.apache.axis2.context.MessageContext messageContext, boolean earlyBuild) throws java.io.IOException, javax.xml.stream.XMLStreamException
java.io.IOException
javax.xml.stream.XMLStreamException
public static void buildMessage(org.apache.axis2.context.MessageContext messageContext, boolean earlyBuild, java.io.InputStream in) throws java.io.IOException, org.apache.axis2.AxisFault
java.io.IOException
org.apache.axis2.AxisFault
public static java.lang.String getMIMEContentType(java.lang.String contentType)
contentType
- content type header valuepublic static boolean isDeleteRequestWithoutPayload(org.apache.axis2.context.MessageContext msgContext)
msgContext
- MessageContextpublic static boolean shouldOverwriteContentType(org.apache.axis2.context.MessageContext msgContext, TargetRequest request)
msgContext
- MessageContextpublic static boolean isEmptyPayloadStream(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- target inputstreamjava.io.IOException
public static void consumeAndDiscardMessage(org.apache.axis2.context.MessageContext msgContext) throws org.apache.axis2.AxisFault
msgContext
- Axis2 Message context which contains the dataorg.apache.axis2.AxisFault
- AxisFaultCopyright © 2005-2020 Apache Software Foundation. All Rights Reserved.