You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2003/04/30 21:03:38 UTC
DO NOT REPLY [Bug 19495] New: -
DIME attachments contained in an InputStream differerent for a FileInputStream don't work
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19495>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19495
DIME attachments contained in an InputStream differerent for a FileInputStream don't work
Summary: DIME attachments contained in an InputStream differerent
for a FileInputStream don't work
Product: Axis
Version: 1.1rc2
Platform: All
OS/Version: All
Status: NEW
Severity: Major
Priority: Other
Component: Basic Architecture
AssignedTo: axis-dev@ws.apache.org
ReportedBy: rathcale@us.ibm.com
I am attempting to return binary attachment data in Axis in DIME type format.
Axis works great when I return an attachment contained in a FileInputStream, but
when I try to use a different input stream, such as a database input stream, it
fails.
Here's why:
Bug 1:
DimeBodyPart.getDataSize() gets the InputStream from the DataHandler in the
AttachmentPart and loops through to get the size in bytes. When the reading is
done, the close() method is called on the InputStream. It should not be because
the same InputStream is read again in the DimeBodyPart.send() method. It is
even closed again in the send() method.
Bug 2:
DimeBodyPart.getDataSize() also need to call reset() on the InputStream because
the next read of the stream in DimeBodyPart.send() needs to begin at the
beginning of the stream. If a reset is not called, the pointer will be after
the last byte in the stream.