Wed Aug 15, 2018 3:00 pm
Login Register Lost Password? Contact Us


Java Plugin

Comments and questions related to the Enterprise Control Language

Wed Nov 29, 2017 8:10 pm Change Time Zone

All,

I have a Java plugin that works when I return a string as shown in example#1.

string validationDoc(String document,String xsdpath) := import(java, 'com.path.to.lib.myLib.validateDoc:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;');

I want to use the same function signature except now I want to return a boolean.

boolean validationDoc(String document,String xsdpath) := import(java, 'com.path.to.lib.myLib.validateDoc:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/boolean;');

I've tried many different permutations of the boolean return type as it seems to be a primitive type. I've tried Lboolean, L/boolean, Ljava/boolean, etc and can't seem to get it to work. Any help would be appreciated.
wjblack
 
Posts: 5
Joined: Mon Jul 11, 2016 12:45 pm

Fri Dec 01, 2017 4:03 pm Change Time Zone

Hi William,

If the STRING usage works, why not return the STRING and then cast it to a BOOLEAN definition after?

IsValidationDOC := (BOOLEAN)ValidationDoc();

Something like that....

Regards,

Bob
bforeman
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 975
Joined: Wed Jun 29, 2011 7:13 pm


Return to ECL

Who is online

Users browsing this forum: No registered users and 1 guest