When invoking a JAX-WS service that is supposed to send a multipart/related
message with an attachment whose Content-Type is "image/jpeg", the following
occurs:

Caused by: javax.activation.UnsupportedDataTypeException: no object DCH for
MIME type image/jpeg
        at 
javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:909)
        at javax.activation.DataHandler.writeTo(DataHandler.java:330)
        at
org.apache.cxf.attachment.AttachmentSerializer.writeAttachments(AttachmentSerializer.java:265)
        at
org.apache.cxf.interceptor.AttachmentOutInterceptor$AttachmentOutEndingInterceptor.handleMessage(AttachmentOutInterceptor.java:103)

Looking at the AttachmentUtil static initializer, it looks like the
org.apache.cxf.attachment.ImageDataContentHandler class should be the
DataContentHandler that should write the output for an attachment with MIME
type "image/jpeg". However, obviously, that's not happening, as evidenced by
the UnsupportedDataTypeException. Or maybe I'm just not understanding how
Javamail and the Java Activation Framework works.

Any ideas why this is happening?



--
View this message in context: 
http://cxf.547215.n5.nabble.com/ImageDataContentHandler-correct-DCH-to-write-image-jpeg-attachment-tp5757026.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to