[ http://issues.apache.org/jira/browse/AXIS-1997?page=all ]
     
Davanum Srinivas resolved AXIS-1997:
------------------------------------

    Resolution: Fixed

Applied Patch.

thanks,
dims

> Regression causing out-of-memory errors for services without attachments 
> returning large response messages
> ----------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-1997
>          URL: http://issues.apache.org/jira/browse/AXIS-1997
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2
>  Environment: Irrelevant to issue at hand
>     Reporter: Jason Sweeney

>
> In version 1.1, specifying a value of "none" to the attachment attribute of a 
> service in the deployment description file ensured that the response message 
> would be directly serialized to the HTTP response stream (for the HTTP 
> transport type).
> This has been broken in the 1.2 version by the addition of the following 
> lines in the org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount() 
> method:
>             // force a serialization of the message so that
>             // any attachments will be added
>             soapPart.saveChanges();
> This method is called from the org.apache.axis.Message.getContentType() 
> method in the following section:
>         if (mAttachments != null && 0 != mAttachments.getAttachmentCount()) {
>             ret = mAttachments.getContentType();
>         }
> In order to preserve the support of large response message for services that 
> explictly do not allow attachments, the following code (or its functional 
> equivalent) should be added:
>  
> >>      int sendType = Attachments.SEND_TYPE_NOTSET;
> >>      if ((msgContext != null) && (msgContext.getService() != null)) {
> >>          sendType = msgContext.getService().getSendType();
> >>      }
> >>      if (sendType != Attachments.SEND_TYPE_NONE) {
>             if (mAttachments != null && 0 != 
> mAttachments.getAttachmentCount()) {
>                 ret = mAttachments.getContentType();
>             }
> >>      }
> NOTE: Detection of the send type was already present in the 1.1 version of 
> this method.
> There is no functional issue with this modification since the service 
> explicitly declares itself free of attachments, so the attachment count will 
> necessarily be zero.  This low-cost extra validation allows for an entire 
> realm of services to be supported by Axis (massive exports of data) in a 
> seamless way immediately in 1.2.

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