QName portQN1 = new QName(namespaceURI, multiPortWsdl_portLocalPart1);
QName portQN2 = new QName(namespaceURI, multiPortWsdl_portLocalPart2);
ClientMetadataMTOMPortSEI enabledPort = service.getPort(portQN1, ClientMetadataMTOMPortSEI.class);
BindingProvider enabledBindingProvider = (BindingProvider) enabledPort;
SOAPBinding enabledSoapBinding = (SOAPBinding) enabledBindingProvider.getBinding();
assertTrue("MTOM is not enabled", enabledSoapBinding.isMTOMEnabled());
assertEquals("Threashold value incorrect", MTOM_THRESHOLD, enabledSoapBinding.getMTOMThreshold());
ClientMetadataMTOMPortSEI2 disabledPort = service.getPort(portQN2, ClientMetadataMTOMPortSEI2.class);
BindingProvider disabledBindingProvider = (BindingProvider) disabledPort;
SOAPBinding disabledSoapBinding = (SOAPBinding) disabledBindingProvider.getBinding();
assertFalse("MTOM is enabled and should not be", disabledSoapBinding.isMTOMEnabled());
assertEquals("Threashold value incorrect", 0, disabledSoapBinding.getMTOMThreshold());
}