0

我正在从 imap 服务器检索邮件,当我执行message.getContent();where message isjavax.mail.Message 时,我收到以下异常:

java.io.IOException: Cannot convert DataSource with content type "TEXT/XML; charset=utf-8; name=FILENAME.XML" to object in XmlDataContentHandler
    at com.sun.xml.ws.encoding.XmlDataContentHandler.getContent(XmlDataContentHandler.java:99)
    at javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:790)
    at javax.activation.DataHandler.getContent(DataHandler.java:537)
    at javax.mail.internet.MimeMessage.getContent(MimeMessage.java:1419)
4

0 回答 0