Class Utils


  • public class Utils
    extends Object
    This is a MTOM module utility class. It contains some useful methods used into the MTOM module.
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • getMTOMPolicy

        public static org.apache.neethi.Policy getMTOMPolicy​(Parameter param)
        Based on the parameter passed a MTOM10Assertion object is created by default.
        Then it is added to a Policy object and returned.
        Parameters:
        param - the Parameter object that contains the value of the "enableMTOM" parameter:
        "true" or "optional".
        Returns:
        The Policy object for the MTOM assertion.
      • applyPolicyToSOAPBindings

        public static void applyPolicyToSOAPBindings​(AxisService axisService,
                                                     org.apache.neethi.Policy policy)
                                              throws AxisFault
        Applies the MTOM policy to the binding level of the web service.
        Parameters:
        axisService - the AxisService to whom binding level the MTOM policy should be attached.
        policy - the Policy object that contains the MTOM assertion.
        Throws:
        AxisFault - thrown if the parameter is locked on a parent level - thus it could not be added.