process Mtom policy assertions and if found and is not optional then mtom is enabled on the
{@link WSDLBoundPortType}
if ((null==model) ||(null==policyMap)) {
return;
}
for (WSDLService service:model.getServices().values()) {
for (WSDLPort port : service.getPorts()) {
PolicyMapKey key = PolicyMap.createWsdlEndpointScopeKey(service.getName(),port.getName());
Policy policy = policyMap.getEndpointEffectivePolicy(key);
if (null!=policy && policy.contains(OPTIMIZED_MIME_SERIALIZATION_ASSERTION)) {
Iterator <AssertionSet> assertions = policy.iterator();
while(assertions.hasNext()){
AssertionSet assertionSet = assertions.next();
Iterator<PolicyAssertion> policyAssertion = assertionSet.iterator();
while(policyAssertion.hasNext()){
PolicyAssertion assertion = policyAssertion.next();
if(OPTIMIZED_MIME_SERIALIZATION_ASSERTION.equals(assertion.getName()) && !assertion.isOptional()){
port.getBinding().addFeature(new MTOMFeature(true));
} // end-if non optional mtom assertion found
} // next assertion
} // next alternative
} // end-if policy contains mtom assertion
} // end foreach port
} // end foreach service