We have a requirement where we need to pass a serialized dataHandler to a webservice running on websphere. We are able to create the dataHandler, but the hurdle is serializing the dataHandler and sending it to webSphere. Here is our code:
import javax.activation.*;
FileDataSource dataSource = new FileDataSource(myFile);
DataHandler handler = new DataHandler(dataSource);