How to create a SMIL attachment to a mime message
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   amit_mendelson
Posted On:   Sunday, March 18, 2001 11:39 PM

I wrote a program that takes a message and creates a smil file from the attachments, than adds it to the original message as an attachment. however, when I have to set the content of the new MimeBodyPart, I have an exception: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/smil at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:851) at javax.activation.DataHandler.writeTo(DataHandler.java:305) at com.comverse.mms.transformator.transform.PresentationFileHandler.saveAttach(PresentationFileHandler.java:53) at com.comverse.mms.handset.displayer.MsgDisplayer.show(MsgDisplayer.java:175) at com.comverse.mms.handset.displayer.SendShowHtml.main(SendSmil.java:141   More>>

I wrote a program that takes a message and creates a smil file from the attachments, than adds it to the original message as an attachment.
however, when I have to set the content of the new MimeBodyPart, I have an exception:
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/smil
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:851)
at javax.activation.DataHandler.writeTo(DataHandler.java:305)
at com.comverse.mms.transformator.transform.PresentationFileHandler.saveAttach(PresentationFileHandler.java:53)
at com.comverse.mms.handset.displayer.MsgDisplayer.show(MsgDisplayer.java:175)
at com.comverse.mms.handset.displayer.SendShowHtml.main(SendSmil.java:141)
only if I change the content type to "text/plain" I can bypass this exception. the problem here is that "application/smil" is the official type defined in internet draft. how can I support it?
Attached the original code below.

MimeBodyPart mbp = new MimeBodyPart();
FileDataSource fds = new FileDataSource(fileName);
mbp.setFileName(fds.getName());
mbp.setDataHandler(new DataHandler(fds));
mbp.setContent(smil,"application/smil");

   <<Less
About | Sitemap | Contact