Does anyone have any direction on how to pull the attachments from a multipart web service response?
I can see by writing out my xmlhttp.responseData that I have a valid response with the soap as the response body and then some uuid boundries dividing off the binary content.
The binary looks good as well, but I can't seem to figure out how to pull the attachment directly from the TiBlob that responseData returns.
I've tried xmlhttp.responseData.getFile() .toString() .file .nativePath .text
but without access to an object debugger I don't know what the makeup of my returned obj.
If anyone has any leads or ideas, please let me know!
Thanks in advance.
Seems like you are getting the binary data just fine.
If you need it on a file, then what you could do is write the data from the response to a temporary file, and then use it as needed:
var myTempFile = Titanium.Filesystem.createTempFile(); myTempFile.write(xmlhttp.responseData);
Think you can help? Login to answer this question!