axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorge Medina <cerebrotecnolog...@gmail.com>
Subject Re: Attaching huge attachments in axis2
Date Sat, 16 Jul 2011 02:01:55 GMT
Never mind, after looking at the Axis2 source code now it is clear  to
me that the error is coming from the server.

You need to modify the server side.
There is nothing you can do in the client side to prevent such error
in the server.
The server may be reading the whole attachment before processing it.



On Fri, Jul 15, 2011 at 9:41 PM, Jorge Medina
<cerebrotecnologico@gmail.com> wrote:
> I am not clear, Is the message " OutOfMemoryError " coming from the server?
> Or is it your client code running out of memory?
>
> I think it is your client code running out of memory because your
> stack trace contains:
>   org.apache.axis2.description.OutInAxisOperationClient.send
> rather than
>   org.apache.axis2.description.OutInAxisOperationClient.receive
>
> Post the segment of code you use to transfer the file.
>
>
>
>
> On Mon, Jul 11, 2011 at 4:56 AM, Bhat B, Niranjan (NSN - IN/Bangalore)
> <niranjan.bhat_b@nsn.com> wrote:
>> Hi Jorge,
>>
>> I am sorry for the misunderstanding here.
>> Let me put it in other words,
>> In the client code I am trying to attach huge file and send it to the
>> server where the webservice is attached.
>> So I get this stack trace with OutOfMemory error in the client side when
>> I try to upload this huge file to the webservice:
>>
>> --cut--
>> Sending ReportOperationStatus
>> ['..\esymacstarter\gmoTemp\osr_13101481196870.xml'] to following
>> manager: 421506509 (to URL
>> http://localhost:8081/axis2/services/NE3SOperationNotificationService)
>> ERROR 08-Jul-2011 23:32:17.734 - AxisFault: ReportOperationStatus
>> sending failed. (..\esymacstarter\gmoTemp\osr_13101481196870.xml to
>> following manager: 421506509 to URL
>> http://localhost:8081/axis2/services/NE3SOperationNotificationService)
>> org.apache.axis2.AxisFault: java.lang.OutOfMemoryError: Java heap space
>>        at
>> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java
>> :435)
>>        at
>> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(Out
>> InAxisOperation.java:371)
>>        at
>> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
>> ation.java:417)
>>        at
>> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
>> xisOperation.java:229)
>>        at
>> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165
>> )
>>        at
>> com.nokiasiemens.www.ne3s._1_0.NE3SOperationNotificationServiceStub.repo
>> rtOperationStatus(NE3SOperationNotificationServiceStub.java:604)
>>        at
>> com.nokia.j2ssp.comp.esymac.common.soapAdapter.notification.ReportOperat
>> ionStatusSender.sendOperationStatusResponse(ReportOperationStatusSender.
>> java:99)
>>        at
>> com.nokia.j2ssp.comp.esymac.common.soapAdapter.notification.Notification
>> SenderThreader.operationStatusResponse(NotificationSenderThreader.java:1
>> 094)
>>        at
>> com.nokia.j2ssp.comp.esymac.common.soapAdapter.notification.Notification
>> SenderThreader.access$200(NotificationSenderThreader.java:36)
>>        at
>> com.nokia.j2ssp.comp.esymac.common.soapAdapter.notification.Notification
>> SenderThreader$SenderThread.run(NotificationSenderThreader.java:420)
>> --cut--
>>
>> -----Original Message-----
>> From: ext Jorge Medina [mailto:cerebrotecnologico@gmail.com]
>> Sent: Saturday, July 09, 2011 7:26 AM
>> To: java-user@axis.apache.org
>> Subject: Re: Attaching huge attachments in axis2
>>
>> Make sure you stream the file.
>>
>> I use SpringWS on the server side and Axis2 in the client side for
>> downloading files. In the server side, I spawn a new thread to write
>> the attachment portion using PipedInputStream/PipedOutputStream.
>>
>> To do an upload, I would do the same. Spawn a new thread to read the
>> attachment using  PipedInputStream/PipedOutputStream from the stream
>> obtained from the DataHandler, connect the piped streams to the
>> FileInputStream you use to read the file.
>>
>> -Jorge
>>
>>
>>
>> On Fri, Jul 8, 2011 at 6:31 AM, Bhat B, Niranjan (NSN - IN/Bangalore)
>> <niranjan.bhat_b@nsn.com> wrote:
>>>
>>> Hi All,
>>>
>>> Recently I had a use case of attaching a huge attachment file(around
>> 500 MB) in the request to a webservice.
>>> But however, when I tried to do this I see out of memory errors in
>> application logs.
>>> Can you please let me know the efficient way of attaching huge
>> attachment files in the request to a webservice ?
>>> I am using SWA attachment APIs.
>>>
>>> regards,
>>> Niranjan
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: java-user-help@axis.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Mime
View raw message