axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lisa Preston (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-1433) Problem about Stub adds the Attachment of response to the next request
Date Fri, 03 Jun 2005 19:37:54 GMT
    [ http://issues.apache.org/jira/browse/AXIS-1433?page=comments#action_12312558 ] 

Lisa Preston commented on AXIS-1433:
------------------------------------

This issue still exists in the Axis 1.2 Final release code.  I was trace the problem to the
fact that the Stub.extractAttachments call does not get rid of the attachments for an invocation
of the web service, so when the stub is reused, the attachments from the previous invocation
are still in the attachments array.  As a result, any attachment that was received on the
previous invocation is attached to the next request.  The simple solution to this problem
would be to either: (1) have extractAttachments destroy the attachments one they are transferred
to the Call object, or (2) call clearAttachments right after the extractAttachments() call
that is written for each operation stub.  I don't know if it fixes the problem with the DataHandlers,
but it does prevent extra attachments in web service requests.

> Problem about Stub adds the Attachment of response to the next request
> ----------------------------------------------------------------------
>
>          Key: AXIS-1433
>          URL: http://issues.apache.org/jira/browse/AXIS-1433
>      Project: Axis
>         Type: Bug
>     Versions: 1.2 Beta, 1.0, 1.2 Alpha, 1.1RC1, 1.1rc2, 1.1, 1.1beta
>  Environment: OS:Win2k
> JRE: J2SE1.4.2_03
> Axis 1.1, 1.2Beta
>     Reporter: Takaya Matsuishi
>     Priority: Critical

>
> Hi, all
> Our software(Client for Web Service) calls Web Service which returns
> MIME Attachment with Stub generated by WSDL2Java.
> While the client had held DataHandler acquired from the response is
> called, if the client calls web service using same Stub instance, client
> CAN NOT access to the InputStream in DataHandler.
> (InputStream throws IOException of "resouceDeleted.")
> I investigated the source, and confirmed InputStream becomes invalid in the
> following flow.
> 1. 
> At this line of each Stub methods,
> "extractAttachements(_call);"
> (after "Object _resp = call.invoke(xx);"),
> Stub holds attachments in response.
> 2.
> Stub adds to the request in next "setAttachments(_call);".
> 3.
> When HttpSender outputs the requests to the stream, Massage calls
> "AttachmentsImpl#writeContentToStream()".
> 4.
> AttatchementImpl calls ManagedMemoryDataSource#delete(), then
> InputStream becomes invalid.
> I also saw these bug reports.
> http://marc.theaimsgroup.com/?l=axis-dev&m=104154097030432&w=2
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13769
> However, I cannot understand why Stub adds the Attachment of response to
> the next request, and I have no idea how I should avoid.
> Please advise me.
> Thank you.
> Best regards,
> Takaya Matsuishi

-- 
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


Mime
View raw message