Hello guys,
I want help in returning LongBlob data in XML fro MySQL database. I am writing an API for Document Management and storing entire file in database. When I am returning the .doc file in SOAP response, the file contents stored in the database is affecting the XML structure of the SOAP response, as a result the response is not proper. As a work around, I am returning the contents after using base64_encode(). But i am not sure whether this is the optimal solution or no since for some case it MIGHT break the structure again. Also base64_encode() unnecessarily increasing the size of the response returned.
So, can any one suggest me how to return the LongBlob in SOAP response???
Thanks in advance,
Suhas!!!
LongBlob in XML
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: LongBlob in XML
base64 adds about a third of the original data's size to the request (this is unavoidable). Binary data must always be encoded over certain transport layers, i.e. http requests.