//Create a DataHandler with the String DataSource object
DataHandler dataHandler = new DataHandler(stringDS);
//Store the data handler in ImageDepot bean
ImageDepot imageDepot = new ObjectFactory().createImageDepot();
imageDepot.setImageData(dataHandler);
Service svc = Service.create(serviceName);
svc.addPort(portName, null, endpointUrl);
JAXBContext jbc = JAXBContext.newInstance("org.test.mtom");