You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Gregory CHAZALON <gr...@steria.com> on 2004/03/09 11:38:32 UTC

Truncated attachment issue

Hi Axis developers,

I work on a small Proof Of Concept for future developments using SOAP
messages with attachments. I just send a SOAP message with a text file
as an attachment. My WebService just gets it and writes it on the disk.
But It only stores the first 8kB of data. The rest of it (e.g. 1023
bytes) is ignored. 
The most disturbing is the logging I can see from Axis internal classes :

2004-03-09 10:47:24,678 DEBUG [webservices.ejb.ArchiveBean] received
data text/plain
2004-03-09 10:47:24,678 DEBUG
[org.apache.axis.attachments.ManagedMemoryDataSource$Instream] 17163616
read(0, 8192)
2004-03-09 10:47:24,688 DEBUG
[org.apache.axis.attachments.ManagedMemoryDataSource$Instream] len = 8192
2004-03-09 10:47:24,688 DEBUG
[org.apache.axis.i18n.ProjectResourceBundle]
org.apache.axis.i18n.resource::handleGetObject(read)
2004-03-09 10:47:24,688 DEBUG
[org.apache.axis.attachments.ManagedMemoryDataSource$Instream]
17163616read 8192 bytes
2004-03-09 10:47:24,688 DEBUG
[org.apache.axis.attachments.ManagedMemoryDataSource$Instream] 17163616
read(0, 8192)
2004-03-09 10:47:24,688 DEBUG
[org.apache.axis.attachments.ManagedMemoryDataSource$Instream] len = 1023
2004-03-09 10:47:24,688 DEBUG
[org.apache.axis.i18n.ProjectResourceBundle]
org.apache.axis.i18n.resource::handleGetObject(read)
2004-03-09 10:47:24,688 DEBUG
[org.apache.axis.attachments.ManagedMemoryDataSource$Instream]
17163616read 1023 bytes
2004-03-09 10:47:24,688 DEBUG
[org.apache.axis.attachments.ManagedMemoryDataSource$Instream] 17163616
read(0, 8192)
2004-03-09 10:47:24,688 DEBUG
[org.apache.axis.attachments.ManagedMemoryDataSource$Instream] close()
2004-03-09 10:47:24,688 DEBUG [webservices.ejb.ArchiveBean] Successfuly
created archive file D:\archive1078825644678 

It seems that the Instream is stuck on the first 8kB though it knows
that it has 1023 bytes left to read. 
Maybe there is something wrong with the offset while reading from the
stream. I haven't been able to find an obvious mistake neither in my
code nor in Axis's so I hope you can help.

Here is some info about my configuration :
- java full version "1.4.2_03-b02"
- JBoss 3.2.3
- Axis 1.1
- a stateless Session Bean as provider (java:EJB)
- using JAFDataHandlerSerializerFactory and
JAFDataHandlerDeserializerFactory to manage attachment
- attachment is a simple text file (MIME text/plain)


I will appreciate any help.

Thanks

Gregory