.getSOAPPartInputStream())));
builder = new MTOMStAXSOAPModelBuilder(reader, attachments, null);
OMElement root = builder.getDocumentElement();
OMElement body = (OMElement) root.getFirstOMChild();
OMElement data = (OMElement) body.getFirstOMChild();
OMText blob = (OMText) data.getFirstOMChild();
/*
* Following is the procedure the user has to follow to read objects in
* OBBlob User has to know the object type & whether it is serializable.
* If it is not he has to use a Custom Defined DataSource to get the
* Object.
*/
DataHandler actualDH;
actualDH = (DataHandler)blob.getDataHandler();
BufferedImage bufferedImage = ImageIO.read(actualDH.getDataSource().getInputStream());
this.saveImage("image/jpeg",bufferedImage, new FileOutputStream(imageOutFileName) );
}