What exactly your web service is returning like object,xml,text etc?
As you have mentioned it is returning:-
- document name - String
- document owner - String
- date created - Date
- document data - ByteArray
- document size - int
But what is the outter most content inside which these all are??
Thanks for your reply.
The web service is returning ArrayCollection with these objects in it.
Sorry, I replied in hurry. It's a SOAP based Web Service and it is returning in XML format.
Hope I am clear.
Use a binary AMF server (like BlazeDS or ZendAMF) to use a ByteArray in your remote service.
Or if you cannot do that base 64 encode the binary pass them as string and upon client handle them by hand.
Thanks drkstr_1 & Claudiu for reply.
Claudiu, here is what I am understanding from your reply, please correct me if I am wrong ---- Instead of receiving the documentData as ByteArray I can receive it as Base 64 encoded String and on the client side i.e in the result handler decode the Base 64 String and type convert it to ByteArray and then write it to temp file to read it further.
I did something same but I didn't use Base 64 encode & decode, it is giving me the below error -
InvocationTargetException: org.dom4j.DocumentException: Error on line 1 of document : Character reference "" is an invalid XML character. Nested exception: Character reference "" is an invalid XML character.
( I am getting the above error when I try to "Test Operation" from the Flash Builder 4.5.1, does it mean I am doing some mistake in the web service? )
Are you sure there is not an DB error or some server side error. Some null getting in your object ? I worked with web services a while ago and most errors came from db errors or nulls not handled properly.