Oct 9, 2012 at 6:54 AM
Edited Oct 9, 2012 at 7:03 AM
Thank you Robert for your reply. I address the following remarks to your kind self and anyone else who may be able to assist, as I imagine the Coldfusion test client could be useful to a new audience.
I can't see that there would be anything wrong with the template Robert as it's your orderTemplate.docx that I'm using in my test. Also, as per my original message, I have tried opening the corrupt document as a zip, but that doesn't work as the Windows
7 zipped folder utility says it's an invalid archive. No, I think the issue is something to do with how I'm handling the response.
I have tried both MTOM and text and am still searching for precisely how I should handle either of these responses in CFML. While not a C#/Net programmer I have looked at your code, searching for clues, but apart from a ToArray() function I can't see
any explicit operation on the http response (maybe there's things going on in a layer of the software that isn't evident). I'm imagining that the To Array() is equivalent to the toByteArray() I'm using on the fileContent element of the httpResponse (a
link to my code is in the first paragraph of my original message).
I had tried to make the corrupted and recovered documents available for anyone interested and struck a problem with downloading .docx files as noted
here. This has indirectly proved useful, because I changed the file extensions to .doc. Now the
recovered file still opens in Word 2007 with no drama, while the
corrupt original causes Word 2007 to offer a File Conversion dialog (if you try, careful, this dialog can open in the background and appear to freeze the machine). In this dialog one cane see what it is that has been saved. It starts with the
'--uuid:' markers which I gather are part of MTOM.
Further, if one saves the corrupt original then changes the extension back to .docx Word 2007 will offer the correct recovery to complete the cycle back to the recovered document.
Would really value a resolution to this (including a donation!) so that I can automate the whole process and not need to intervene in Word to recover the documents.
Really nice piece of software Robert, thank you. Barry