Sorry for double posting to axis-dev, axis-user.
But I think that the devs should give attention to this problem.

This problem is reported to Jira several times. The related ones are:

http://issues.apache.org/jira/browse/AXIS-1433
http://issues.apache.org/jira/browse/AXIS-1430

The problem is org.apache.axis.Stub's 'attachments' member.
Stub uses 'attachments' in both request and response.
 
After receving soap message, the stub's extractAttachments() method stores the 
response attachments 
to its 'attachements' member. 
On the next call, the setAttachments() method stores the previous attachments 
to the request soap message.

I think the axis's stub class is designed to handle attachments more flexiblely 
like this:  
(in test.wsdl.interop4.groupG.dime.doc.DimeDocInteropTestCase's 
test5DimeDocSoapPortEchoUnrefAttachments())

AttachmentsPortType binding = ...;  
DataHandler dh = ...
((org.apache.axis.client.Stub)binding).addAttahcment(dh);
binding.echoUnrefAttachments();        // Stub.setAttchment() and 
Stub.extractAttachement() called. 
Object attachments[] = ((org.apache.axis.client.Stub)binding).getAttachments();

I think the Stub should have two seperate attachments member for request and 
response
for retaining interfaces above and fixing the bugs reported.  
The methods for attachment need to be rearranged:

getAttachments : (deprecated) use getResponseAttachments() instead.
clearAttachments : clear all REQ/RESP attachments
addAttachment : adding attachment to REQUEST attachment 
setAttchment : storing REQUEST attachments to soap message 
extractAttachment : extracting RESPONSE attachment from soap message
getRequestAttachments: (NEW) returning the REQUEST attachments
getResponseAttachments: (NEW) returning the RESPONSE attachments

Any opinion?

/Jongjin 


----- Original Message ----- 
From: "Vy Ho" <[EMAIL PROTECTED]>
To: "Axis-User" <[EMAIL PROTECTED]>
Sent: Tuesday, January 11, 2005 2:52 AM
Subject: Please help vote for this issue


> 
> When using DataHandler, Axis would often erroneously send the attached 
> data in the next different request (that has no attachment whatsoever).  
> This is an error by itself and also causes application freezes up.  I 
> believe this is really a serious issue and a show stopper.  Please vote 
> for it at:
> 
> http://issues.apache.org/jira/browse/AXIS-1729
> 
> 
>

Reply via email to