[ http://issues.apache.org/jira/browse/AXIS-1906?page=all ]

Raphael Jean updated AXIS-1906:
-------------------------------

    Attachment: EchoAttachment.java
                TestAttachmentsSample.java

dims,
I added a test to test.functional.TestAttachmentsSample 
(doTestAttachmentsJIRA_1906) and a corresponding method in 
sample.attachments.EchoAttachment (echoJIRA_1906).
This reproduces the problem. I tried both with HTTPSender and CommonsHTTPSender 
with the same result.
The problems seems to be in 
org.apache.axis.attachments.DimeBodyPart.getDataSize(DataHandler)

Hope this helps,
Raph

> CLONE -dime attachment content is empty if datahandler's source is not 
> FileDataSource
> -------------------------------------------------------------------------------------
>
>          Key: AXIS-1906
>          URL: http://issues.apache.org/jira/browse/AXIS-1906
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.1
>  Environment: Operating System: Other
> Platform: Other
>     Reporter: Raphael Jean
>  Attachments: EchoAttachment.java, TestAttachmentsSample.java
>
> The problem is that in DimeBodyPart for getDataSize(), if the source is not 
> FileDataSource we actually read the whole input stream and then close it. 
> When 
> we close it we can no longer use the stream to write out the content. One 
> possible solution would be that while we read in the data to get the size, we 
> write it out to a ByteArrayOutputStream and then use it to write out the data 
> out.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to