JAXBContext jbc = JAXBContext.newInstance("org.apache.axis2.jaxws.sample.mtom1");
Dispatch<Object> dispatch = svc.createDispatch(QNAME_PORT, jbc, Service.Mode.PAYLOAD);
Image image = ImageIO.read (new File(imageResourceDir+File.separator+"test.jpg"));
ImageDepot imageDepot = new ObjectFactory().createImageDepot();
imageDepot.setImageData(image);
setText(imageDepot);
//Create a request bean with imagedepot bean as value
ObjectFactory factory = new ObjectFactory();
Invoke request = factory.createInvoke();