//Attach a java.awt.Image object to the SOAP request
String jpgfilename = System.getProperty("basedir", ".") + "/" + "test-resources/axis2.jpg";
File myfile = new File(jpgfilename);
FileDataSource fds = new FileDataSource(myfile);
DataHandler imageDH = new DataHandler(fds);
AttachmentPart jpegAttach = request.createAttachmentPart(imageDH);
jpegAttach.addMimeHeader("Content-Transfer-Encoding", "binary");
jpegAttach.setContentId("submitSampleImage@apache.org");
jpegAttach.setContentType("image/jpg");
request.addAttachmentPart(jpegAttach);