Class SOAPUtils


  • public class SOAPUtils
    extends Object
    • Constructor Detail

      • SOAPUtils

        public SOAPUtils()
    • 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 done
        soapVersionURI - 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:
        1. Convert envelope, header elements
        2. For each header block convert attribute actor to role
        3. For each header block convert mustUnderstand value type
        4. For each header block remove 1.1 namespaced other attributes
        Fault Changes:
        1. Convert fault element
        2. faultcode to Fault/Code
        3. 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:
        1. Convert envelope, header elements
        2. For each header block convert attribute role to actor
        3. For each header block convert mustUnderstand value type
        4. For each header block remove 1.2 namespaced other attributes
        Fault Changes:
        1. Convert fault element
        2. Fault/Code to faultcode
        3. 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