org.apache.synapse.core.axis2
Class SOAPUtils

java.lang.Object
  extended by org.apache.synapse.core.axis2.SOAPUtils

public class SOAPUtils
extends Object


Constructor Summary
SOAPUtils()
           
 
Method Summary
static void convertSOAP11toSOAP12(MessageContext axisOutMsgCtx)
          Converts the version of the the message context to 1.2.
static void convertSOAP12toSOAP11(MessageContext axisOutMsgCtx)
          Converts the version of the the message context to 1.1.
static void convertSoapVersion(MessageContext axisOutMsgCtx, String soapVersionURI)
          Converts the SOAP version of the message context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SOAPUtils

public SOAPUtils()
Method Detail

convertSoapVersion

public static void convertSoapVersion(MessageContext axisOutMsgCtx,
                                      String soapVersionURI)
                               throws 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:
AxisFault - in case of an error in conversion

convertSOAP11toSOAP12

public static void convertSOAP11toSOAP12(MessageContext axisOutMsgCtx)
                                  throws 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:
AxisFault - incase conversion process fails

convertSOAP12toSOAP11

public static void convertSOAP12toSOAP11(MessageContext axisOutMsgCtx)
                                  throws 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:
AxisFault - in case of an error in conversion


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.