I want to send a pdf file within a xml message.
How do I do that in java? What data type do I use in the schema?
I want to send a pdf file within a xml message. How do I
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can transform the PDF file to Base64 Binary and wrap this into a container Element with type
xs:base64Binary. For example you could use this schema definition to place your PDF file in the xml message.You can use
org.apache.commons.codec.binary.Base64for this approach if you already havecommons-codecin your project. It support use of chunked data and strings. For example: