axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guterl Patrick (JIRA)" <>
Subject [jira] [Created] (AXIS2-5462) Axis2 MTOM client exception when downloading file from service to client [Error reading from source]
Date Wed, 21 Nov 2012 15:07:58 GMT
Guterl Patrick created AXIS2-5462:

             Summary: Axis2 MTOM client exception when downloading file from service to client
[Error reading from source]
                 Key: AXIS2-5462
             Project: Axis2
          Issue Type: Bug
          Components: adb, client-api, wsdl
    Affects Versions: 1.6.2
         Environment: OS: SL 6.2 kernel 2.6 apache-tomcat-7.0.28
            Reporter: Guterl Patrick

I am trying to upload and download large binary files with axis2 using MTOM. I am able to
upload (from client to server) up to 2GB file without any memory issue either at server side
or client side.iy(s work fine
 But when downloading file from server to client, client is getting a exception clien side
:Error reading from source

When the response received at client side, javax.activation.Datahandler is embedded in the
response which is a pointer to InputStream. 
The exception java is up at the instruction 	ataHandler.writeTo(fileOutputStream); 		
DataHandler dataHandler = getResponse.getFile().getBase64Binary();	
FileOutputStream fileOutputStream = new FileOutputStream(f);
if (dataHandler != null)	      dataHandler.writeTo(fileOutputStream); 
And this is the same mechanism while uploading, and there is no problem at that end.

Seems to be a bug at client side ??
server side
   <parameter name="enableMTOM">true</parameter>

printTrace exception Error reading
from source

	at org.apache.axiom.attachments.PartContentFactory.createPartContent(
	at org.apache.axiom.attachments.PartImpl.fetch(
	at org.apache.axiom.attachments.PartImpl.getContent(
	at org.apache.axiom.attachments.PartImpl.writeTo(
	at org.apache.axiom.attachments.PartDataHandler.writeTo(
	at iphc.wsdl.client.ClientImpl.handleGetResponse(
	at ClientGetFile.main(
Caused by: Error reading from source
	at org.apache.axiom.attachments.utils.BAAOutputStream.readFrom(
	at org.apache.axiom.attachments.impl.BufferUtils.inputStream2OutputStream(
	at org.apache.axiom.attachments.PartContentFactory.createPartContent(
	... 6 more
Caused by: Attempted read on closed stream.
	at org.apache.commons.httpclient.AutoCloseInputStream.isReadAllowed(
	at org.apache.axiom.attachments.utils.BAAOutputStream.readFrom(
	... 8 more


This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message