Skip to Content
Former Member
Oct 16, 2010 at 05:13 PM

attach an xml to a pdf using ADS


Hi all,

I have a scenario where we are sending a Base64 encoded PDF (a bill) and the corresponding xml data from SAP backend on level 4.6C to PI 7.1. In PI we should attach the xml data to the PDF. I have already succeeded to do this using iText but we have a requirement to do this with ADS instead. In Netweaver Developer Studio I created an example project where I am reading a PDF as a byte array, also reading an XML file and try to attach the XML to the PDF using the ADS api. The project successfully built in NWDS but when I am running the project it failes.

I am using standard code to attach the xml stream to the pdf, the error message is thrown when the following line is executed:

IWDPDFDocument document = context.execute();

Exception in thread "main" java.lang.ExceptionInInitializerError


at com.eon.xi.dijnet.base64.PdfWithAttachment.addAttachmentWithSap(

at com.eon.xi.dijnet.base64.PdfWithAttachment.main(

Caused by: java.lang.NullPointerException



... 3 more

Is it the problem with the PDF that it is not an Interactive Form?

Or the problem is simply that I am trying to run the project on my local machine where ADS is not available?

Thanks for your help.


Edited by: Pal Somogyi on Oct 17, 2010 10:30 PM

Edited by: Pal Somogyi on Oct 18, 2010 11:44 AM