Package org.apache.synapse.core.axis2
Class SOAPUtils
- java.lang.Object
-
- org.apache.synapse.core.axis2.SOAPUtils
-
public class SOAPUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description SOAPUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
convertSOAP11toSOAP12(org.apache.axis2.context.MessageContext axisOutMsgCtx)
Converts the version of the the message context to 1.2.static void
convertSOAP12toSOAP11(org.apache.axis2.context.MessageContext axisOutMsgCtx)
Converts the version of the the message context to 1.1.static void
convertSoapVersion(org.apache.axis2.context.MessageContext axisOutMsgCtx, String soapVersionURI)
Converts the SOAP version of the message context.
-
-
-
Method Detail
-
convertSoapVersion
public static void convertSoapVersion(org.apache.axis2.context.MessageContext axisOutMsgCtx, String soapVersionURI) throws org.apache.axis2.AxisFault
Converts the SOAP version of the message context. Creates a new envelope of the given SOAP version, copy headers and bodies from the old envelope and sets the new envelope to the same message context.- Parameters:
axisOutMsgCtx
- messageContext where version conversion is donesoapVersionURI
- either org.apache.axis2.namespace.Constants.URI_SOAP12_ENV or org.apache.axis2.namespace.Constants.URI_SOAP11_ENV- Throws:
org.apache.axis2.AxisFault
- in case of an error in conversion
-
convertSOAP11toSOAP12
public static void convertSOAP11toSOAP12(org.apache.axis2.context.MessageContext axisOutMsgCtx) throws org.apache.axis2.AxisFault
Converts the version of the the message context to 1.2.
Message Changes:- Convert envelope, header elements
- For each header block convert attribute actor to role
- For each header block convert mustUnderstand value type
- For each header block remove 1.1 namespaced other attributes
- Convert fault element
- faultcode to Fault/Code
- faultstring to First Fault/Reason/Text with lang=en
- Parameters:
axisOutMsgCtx
- message context to be converted- Throws:
org.apache.axis2.AxisFault
- incase conversion process fails
-
convertSOAP12toSOAP11
public static void convertSOAP12toSOAP11(org.apache.axis2.context.MessageContext axisOutMsgCtx) throws org.apache.axis2.AxisFault
Converts the version of the the message context to 1.1.
Message Changes:- Convert envelope, header elements
- For each header block convert attribute role to actor
- For each header block convert mustUnderstand value type
- For each header block remove 1.2 namespaced other attributes
- Convert fault element
- Fault/Code to faultcode
- First Fault/Reason/Text to faultstring
- Parameters:
axisOutMsgCtx
- message context to be converted- Throws:
org.apache.axis2.AxisFault
- in case of an error in conversion
-
-