Outputting a DataHandler object intot the pipeline

I created a DataHandler object in a Java service and attempted to output it into the pipeline using an Object in the output tab. I imported javax.activation in the shared tab for the DataHandler. When I run the service, the outcome is the DataHandler is of type String instead of Object. Please let me know if I am doing something wrong or misunderstanding something. Thanks. I’m running IS 4.6

File testFile = new File(“c:\testFile.xls”);

try
{
FileDataSource dataSource = new FileDataSource(testFile);

DataHandler handler = new DataHandler(dataSource);

IDataHashCursor pipelineCursor_1 = pipeline.getHashCursor();
pipelineCursor_1.last();
pipelineCursor_1.insertAfter(“handler”, handler);
pipelineCursor_1.destroy();
}

catch(Exception e)
{
throw new ServiceException("Exception: " + e.getMessage());
}