* (non-Javadoc)
* @see org.apache.axis2.jaxws.feature.util.WebServiceFeatureConfigurator#performConfiguration(org.apache.axis2.jaxws.core.MessageContext, org.apache.axis2.jaxws.spi.BindingProvider)
*/
public void configure(MessageContext messageContext, BindingProvider provider) {
Binding bnd = (Binding) provider.getBinding();
MTOMFeature mtomFeature = (MTOMFeature) bnd.getFeature(MTOMFeature.ID);
Message requestMsg = messageContext.getMessage();
//Disable MTOM.
requestMsg.setMTOMEnabled(false);
if (mtomFeature == null) {
throw ExceptionFactory.
makeWebServiceException(Messages.getMessage("mtomFeatureErr"));
}
//Enable MTOM if specified.
if (mtomFeature.isEnabled()) {
int threshold = mtomFeature.getThreshold();
List<String> attachmentIDs = requestMsg.getAttachmentIDs();
// Enable MTOM
requestMsg.setMTOMEnabled(true);