Element useMTOMElement = findElementNode(soapMessage.getSOAPBody(), "useMTOM");
if (useMTOMElement != null) {
String sUseMTOM = getSubTextChildValue(useMTOMElement);
//If the useMTOM is true, the attachment size should be 1, or the attachment size should be 0
if (Boolean.parseBoolean(sUseMTOM))
Assert.assertEquals(soapMessage.countAttachments(), 1);
else
Assert.assertEquals(soapMessage.countAttachments(), 0);
}
}
} catch (Exception e) {