cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <>
Subject [jira] [Commented] (CXF-4574) Incorrect return type of AttachmentPart.getContent()
Date Wed, 17 Oct 2012 00:30:04 GMT


Freeman Fang commented on CXF-4574:


The AttachmentPart.getContent() actually call into com.sun.xml.messaging.saaj.soap.AttachmentPartImpl.getContent(),
this code is from Sun's SAAJ impl and it's out of CXF code base. So even if there's any conflict
with SAAJ api doc, it's not something CXF can fix here.

> Incorrect return type of AttachmentPart.getContent()
> ----------------------------------------------------
>                 Key: CXF-4574
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.6.2
>         Environment: Windows 7 + Oracle jdk 1.6.0_29
>            Reporter: Han Hong Fang
> The java doc of javax.xml.soap.AttachmentPart.getContent() says:
> Gets the content of this AttachmentPart object as a Java object. The type of the returned
Java object depends on (1) the DataContentHandler object that is used to interpret the bytes
and (2) the Content-Type given in the header.
> For the MIME content types "text/plain", "text/html" and "text/xml", the DataContentHandler
object does the conversions to and from the Java types corresponding to the MIME types. For
other MIME types,the DataContentHandler object can return an InputStream object that contains
the content data as raw bytes.
> A SAAJ-compliant implementation must, as a minimum, return a java.lang.String object
corresponding to any content stream with a Content-Type value of text/plain, a
object corresponding to a content stream with a Content-Type value of text/xml, a java.awt.Image
object corresponding to a content stream with a Content-Type value of image/gif or image/jpeg.
For those content types that an installed DataContentHandler object does not understand, the
DataContentHandler object is required to return a object with the raw
> But in cxf 2.6.2, when MIME content type is "text/xml", the return type of AttachmentPart.getContent()
is, which doesn't comply with the java doc.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message