mtomOutputFormat.setDoOptimize(true);
OMOutputFormat baseOutputFormat = new OMOutputFormat();
baseOutputFormat.setDoOptimize(false);
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespaceImpl soap = new OMNamespaceImpl(
"http://schemas.xmlsoap.org/soap/envelope/", "soap");
OMElement envelope = new OMElementImpl("Envelope", soap, fac);
OMElement body = new OMElementImpl("Body", soap, fac);
OMNamespaceImpl dataName = new OMNamespaceImpl(
"http://www.example.org/stuff", "m");
OMElement data = new OMElementImpl("data", dataName, fac);
FileDataSource dataSource = new FileDataSource(getTestResourceFile(imageInFileName));
expectedDH = new DataHandler(dataSource);