Ok, although I expected "plugins.PDI.VCard(<string>)" to produce a vcard object it didn't work. I am now trying to read from file and get null pointer error:
- Code: Select all
var f = plugins.file.convertToJSFile('C:\\projects\\docs\\100bob\\vcard.txt');
application.output(f.size()) // DISPLAYS CORRRECT SIZE, so the file is accessible and was read
try {
var y = plugins.PDI.AddressBook(['C:\\projects\\docs\\100bob\\vcard.txt']);}
catch(err) {
application.output(err.message)} // java.lang.NullPointerException: null
try{
var x = plugins.PDI.AddressBook([f]);}
catch(err){application.output(err.message)} // java.lang.NullPointerException: null
I also tried with f.getBytes() with same null pointer error. The content of 2.1 version vCard is above in the thread (the file has "\n\" endings removed).
Please advise and if possible provide a working example.