DataHandler expectedDH;
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
OMElement data = fac.createOMElement("mtomSample", omNs);
OMElement image = fac.createOMElement("image", omNs);
Image expectedImage;
expectedImage = new ImageIO()
.loadImage(new FileInputStream(inputFile));
ImageDataSource dataSource = new ImageDataSource("test.jpg",