Jonathan Piedra Posted February 13, 2020 Posted February 13, 2020 I'm invoking and REST API service that return one PDF, in fact the output is just the MessageBody (asciiContent), but I need use this response and mapping as binary data or string, but I can't, if I try of parse the result to XML have the following error: An error occurred while converting json to xml: Unexpected character ('%' (code 37)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [source: java.io.StringReader@2f4275fe; line: 1, column: 2].-{ActivityName=ParseJSON, ProcessName=DocuSignEnvelopeDocumentsGetV1.SubProcesses.Envelope_DocumentsGet, ModuleName=DocuSignEnvelopeDocumentsGetV1} TIBCO-BW-PALETTE-REST-100016 And I can not only map the final fields as BinaryContent or asciiContent, how can I obtain the metadata of the PDF
Richard Lowe 2 Posted February 19, 2020 Posted February 19, 2020 Hi It sounds like the call you're making doesn't have any metadata associated with it - just the pdf itself. Are you trying to call the DocuSign EnvelopeAPIs Richard
Anders Mess Posted November 20, 2023 Posted November 20, 2023 Hey Jonathan,I feel your pain navigating the labyrinth of REST APIs, especially when dealing with the elusive PDFs. It seems like you're encountering a JSON to XML conundrum, and that error message is as cryptic as a riddle. Fear not, fellow coder! I've danced with similar dragons in the past. You can find useful tips on this here: https://andersenlab.com/services/web-developmentTo tame this JSON beast, consider bypassing the XML detour. Instead, embrace the binary beauty of your PDF. When handling the response, go straight for the Binary Content or ascii Content jugular. These fields are your gateway to the PDF's soul.Now, to extract metadata from the PDF, equip yourself with a tool like Apache PDFBox or PyMuPDF. These magical libraries can reveal the secrets hidden within the document. Remember, Jonathan, coding is an art, and every error is just a misstep in the dance. Stay persistent, and soon you'll be waltzing through APIs like a maestro.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now