Hi Everyone, I'm confounded by a SOAP service that returns a binary (for a PDF file) - I'm not able to figure out how to save it as a proper PDF document that Acrobat understands.
I get a SOAP response like (the binary was abridged for readability): <ns1:getObjectFileResponse xmlns:ns1="http://DefaultNamespace" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "><getObjectFileReturn xmlns:soapenc=" http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xsi:type="soapenc:base64Binary">JVBERi0xLjMNCjEgMCBvYmoNCjw8DQovVHlwZSAvUGFnZXMgL0NvdW50IDEgL0tpZHMgWyA4IDAgUiBdCj4+DQplbmRvYmoNCjIgMCBvYmoNCjw8DQovVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMSAwIFIgL091dGxpbmVzIDExIDAgUiAvUGFnZU1vZGUgL1VzZU91dGxpbmVzID4+DQplbmRvYmoNCjMgMCBvYmoNCjw8DQovQ3JlYXRvciAoQWNyb1Bsb3Qgb24gV2luZGDAwMDAwIG4NCjAwMDAwMDQxNzIgMDAwMDAgbg0KMDAwMDA1NDg0MiAwMDAwMCBuDQowMDAwMDU1MDA2IDAwMDAwIG4NCjAwMDAwNTUxMzcgMDAwMDAgbg0KMDAwMDA1NTIyMyAwMDAwMCBuDQp0cmFpbGVyCjw8DQovU2l6ZSAxMiAvSW5mbyAzIDAgUiAvUm9vdCAyIDAgUiAvSUQgWyA8MEVDNTRDNjQ1MUFCOUYyRkU1MDEwNTdDQ0NGMTYyOTg+DQo8MEVDNTRDNjQ1MUFCOUYyRkU1MDEwNTdDQ0NGMTYyOTg+DQpdCj4+DQpzdGFydHhyZWYNCjU1Mjk5DQolJUVPRgo=</getObjectFileReturn></ns1:getObjectFileResponse> However, when I take the binary and save it to a file, I can't open it with Adobe PDF reader; it says the file is corrupted. I'm thinking that I need to call CONVERT FROM TEXT to somehow change the encoding, but I've tried several of the obvious ones (?ISO-8859-1?; "UTF-8", "UTF-16"; "UTF-32"; "US-ASCII") without any luck. DOM GET XML ELEMENT VALUE($aNodeRefsArr{1};$Value) //this contains the payload I want $DocName:="C:\\TEMP\\OUTPUT.PDF" TEXT TO DOCUMENT($DocName;$Value;"US-ASCII")`?ISO-8859-1?; "UTF-8", "UTF-16"; "UTF-32"; "US-ASCII" - none create a document that I can open with Acrobat Thoughts? Many thanks! Bob Miller Chomerics, a division of Parker Hannifin Corporation llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll "PLEASE NOTE: The preceding information may be confidential or privileged. It only should be used or disseminated for the purpose of conducting business with Parker. If you are not an intended recipient, please notify the sender by replying to this message and then delete the information from your system. Thank you for your cooperation." ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************