XmlDataContentHandler Throws Invalid Content type (Doc ID 1385385.1)

Last updated on JUNE 09, 2016

Applies to:

Oracle Weblogic Server - Version: 10.3.1 to 10.3.2
Information in this document applies to any platform.

Symptoms

When passing the content type (for example text/xml;charset=UTF-8) to XmlDataContentHandler.writeTo() method in 10.3.1 version you get the below error

java.io.IOException: Invalid content type text/xml; charset=UTF-8 for XmlDCH
at com.sun.xml.ws.encoding.XmlDataContentHandler.writeTo(XmlDataContentHandler.java:72)
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:869)
at javax.activation.DataHandler.writeTo(DataHandler.java:302)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1350)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:845)



Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms