axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thilina Gunarathne" <cset...@gmail.com>
Subject [Axis2] ADB base64Binary handling
Date Sun, 12 Mar 2006 20:00:49 GMT
Hi,
I noticed that the code generated from ADB converts binary data back and
forth in the case of Base64Binary schema type MTOM optimised contents.. AFA
i understood this behaviour leads Axis2 to read the Binary data in MIME
parts and converts them to Base64binary and then once again converts that
Base64String to bytes...

 object.setData(


org.apache.axis2.databinding.utils.ConverterUtil.convertTobase64Binary(
                           stateMachine2.getText()));

This behaviour is inefficient, can lead to serious memory issues and this
will be a limiting factor for code generated services to handle large binary
attachments....

IMHO use of DataHandlers directly rather than encoding/re encoding
binary back and forth is the correct way to go.. This is what we are doing
in the OMTextImpl... In that case if data came as an attachment, then it
won't undergo any conversions.. If they came in line as Base64 then they
will decode to binary...

We can either change the object.get/setData methods to use DataHandlers
instead of byte[]. Or we can keep them as it is by getting and setting
byte[] internally to data handler...

Thanks,
~Thilina

PS: This email by any means does not imply that I'm volunteering for
this...I Would love to dig in to this.. But too tied up these days....
--
"May the SourcE be with u"
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina

Mime
View raw message