The TIBCO Platform is a real-time, composable data platform that will bring together an evolving set of your TIBCO solutions - and it's available now!
A chart showing the TIBCO Platform vision
Jump to content
Forums
Ask questions and gain insight from discussions

Recommended Posts

Posted

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

  • 3 years later...
Posted

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-development

To 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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...