cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Han Hong Fang (JIRA)" <>
Subject [jira] [Commented] (CXF-4574) Incorrect return type of AttachmentPart.getContent()
Date Fri, 19 Oct 2012 06:52:03 GMT


Han Hong Fang commented on CXF-4574:

I did some quick debugging, and found that the ByteArrayInputStream returned from AttachmentPart.getContent()
is created in LoadingByteArrayOutputStream.createInputStream().

Did I locate the java code incorrectly?
> 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
>            Assignee: Freeman 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