Package org.apache.axis2.mtompolicy
Class Utils
- java.lang.Object
-
- org.apache.axis2.mtompolicy.Utils
-
public class Utils extends Object
This is a MTOM module utility class. It contains some useful methods used into the MTOM module.
-
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
applyPolicyToSOAPBindings(AxisService axisService, org.apache.neethi.Policy policy)
Applies the MTOM policy to the binding level of the web service.static MTOMAssertion
getMTOMAssertion(AxisDescription axisDescription)
Extracts the MTOM assertion object if it is exists into the policy based on a givenAxisDescription
.static org.apache.neethi.Policy
getMTOMPolicy(Parameter param)
Based on the parameter passed aMTOM10Assertion
object is created by default.static AxisService
locateAxisService(AxisDescription axisDescription)
Locates theAxisService
object searching up in the hierarchy recursively theAxisDescription
object passed.
-
-
-
Method Detail
-
getMTOMAssertion
public static MTOMAssertion getMTOMAssertion(AxisDescription axisDescription)
Extracts the MTOM assertion object if it is exists into the policy based on a givenAxisDescription
.- Parameters:
axisDescription
- theAxisDescription
object that should be searched.- Returns:
MTOMAssertion
theMTOMAssertion
found. If it is not found "null" is returned.
-
locateAxisService
public static AxisService locateAxisService(AxisDescription axisDescription)
Locates theAxisService
object searching up in the hierarchy recursively theAxisDescription
object passed.- Parameters:
axisDescription
- theAxisDescription
object that should be checked.- Returns:
- the
AxisService
object found or "null".
-
getMTOMPolicy
public static org.apache.neethi.Policy getMTOMPolicy(Parameter param)
Based on the parameter passed aMTOM10Assertion
object is created by default. Then it is added to aPolicy
object and returned.- Parameters:
param
- theParameter
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
- theAxisService
to whom binding level the MTOM policy should be attached.policy
- thePolicy
object that contains the MTOM assertion.- Throws:
AxisFault
- thrown if the parameter is locked on a parent level - thus it could not be added.
-
-