axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] Commented: (AXIS-1516) attachments not loading on first getAttachments call
Date Tue, 17 Aug 2004 13:33:20 GMT
The following comment has been added to this issue:

     Author: Torsten Glunde
    Created: Tue, 17 Aug 2004 6:33 AM
It turned out that this is due to a strange behaviour:

for the first call with the attachment half way loaded it reads the rest from the stream.
But the ManagedMemoryDataSource throws an exception because the MessageContext.getProperty(MessageContext.MessageContext.ATTACHMENTS_DIR)
returns null.

on the second call to getAttachments the stream content is read again, but the headers are
all null. Therefore there is no length and the flushToDisk method is not called anymore.
The default encoding is used and therefore the attachment is
parsed in with default headers and octet stream decoded.

the first call should be fine then with a attachments dir configured, but the second call
still should not just use null headers with the same stream content again?
View this comment:

View the issue:

Here is an overview of the issue:
        Key: AXIS-1516
    Summary: attachments not loading on first getAttachments call
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis

   Reporter: Torsten Glunde

    Created: Tue, 17 Aug 2004 3:24 AM
    Updated: Tue, 17 Aug 2004 6:33 AM
Environment: jdk1.3.1, tomcat 5, windows, axis 1.1

After invoking the call I am trying to get the attachments with the following call:

I can see within the tcpmonitor that before this call the attachment part is not finished

Iterator i = aCall.getMessageContext().getCurrentMessage().getAttachments();

The Iterator contains no elements.

After calling this method the tcpmonitor has the complete attachment displayed.

after doing a second call to 
i = aCall.getMessageContext().getCurrentMessage().getAttachments();

the attachment appears in the tcpmonitor completely and then my iterator contains the element
I want.

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

View raw message