Hi,
OMElement result = servClient.sendReceive(method);
System.out.println(result);
I get this body:
<soap:Body></soap:Envelope>
<PassExcelBinaryResponse
xmlns="http://XXXXXXXX/soap/WebServices.asp"><PassExcelBinaryResult>PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJ5ZXMiPz4NCjxOZXdEYXRhU2V0Pg0KICA8eHM6c2NoZW1hIGlkPSJOZXdEYXRhU2V0IiB4bWxucz0iIiB4bWxuczp4cz0iaHR0cDovL3d3d........LOTS
AND LOTS MORE
The size of the attached binary file is 900K. The size of the content in
PassExcelBinaryResult is suspiciously around 30% larger...it looks like
Axis2 (Axiom?) has encoded the attached file.
Yes..When asking for the Text value, axiom does an base64 encoding to
the binary data. Unless the data remains as Binary..
For reference here is my code to write the attached binary:
OMText binaryNode = (OMText)xmlElement.getFirstOMChild();
DataHandler dh = (DataHandler)binaryNode.getDataHandler();
FileOutputStream out = new FileOutputStream("../../test/data/temp.xml");
dh.writeTo(out);
out.close();
So my question: Is Axis2 encoding the binary attachment merely for display
purposes? Or will it try to encode the binary attachment and then have to
decode it when I write the file.
Only for the display purposes.. It won't undergo any encoding/decoding
if you are writing directly to a file..
As mentioned using the above code is working however it is very slow..it is
about 4x slower to read the attachment than an equivalent client written for
.NET. This is what led me to start wondering why it was so slow and seeing
that the content seemed to be encoded after I receive the response.
If possible please post us some numbers of the time comparison. Make
sure to avoid the System.out part when doing the comparison (this
encoding takes time :( )...
Thanks,
Thilina
Thanks,
Derek
_________________________________________________________________
Find out the restaurants participating in Winterlicious
http://local.live.com/default.aspx?v=2&cp=43.658648~-79.383962&style=r&lvl=15&tilt=-90&dir=0&alt=-1000&scene=3702663&cid=7ABE80D1746919B4!1329
From January 26 to February 8, 2007
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Thilina Gunarathne
WSO2, Inc.; http://www.wso2.com/
Home page: http://webservices.apache.org/~thilina/
Blog: http://thilinag.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]