public final class PayloadUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
handleSpecialProperties(String contentType,
org.apache.axis2.context.MessageContext axis2MessageCtx)
Changes the content type and handles other headers
|
static void |
preparePayload(org.apache.axis2.context.MessageContext messageContext,
String xmlString)
Converts the XML String to XML Element and sets in message context
|
static void |
setContent(org.apache.axis2.context.MessageContext messageContext,
InputStream inputStream,
String contentType)
Builds content according to the content type and set in the message body
|
static void |
setPayloadInEnvelope(org.apache.axis2.context.MessageContext axis2MsgCtx,
org.apache.axiom.om.OMElement payload)
Sets the OMElement in the message context
|
public static void setContent(org.apache.axis2.context.MessageContext messageContext, InputStream inputStream, String contentType) throws ContentBuilderException
messageContext
- Axis2 Message ContextinputStream
- Content to be built as an input streamcontentType
- Content Type of the content to be set in the payloadContentBuilderException
- if failed to build the contentpublic static void handleSpecialProperties(String contentType, org.apache.axis2.context.MessageContext axis2MessageCtx)
contentType
- ContentType to be set in headeraxis2MessageCtx
- Axis2 Message Contextpublic static void preparePayload(org.apache.axis2.context.MessageContext messageContext, String xmlString) throws ContentBuilderException
messageContext
- Axis2 Message ContextxmlString
- XML String to be set in the bodyContentBuilderException
public static void setPayloadInEnvelope(org.apache.axis2.context.MessageContext axis2MsgCtx, org.apache.axiom.om.OMElement payload) throws ContentBuilderException
axis2MsgCtx
- Axis2 Message Contextpayload
- OMElement to be set in the bodyContentBuilderException
- if failed to set payloadCopyright © 2020 WSO2. All rights reserved.