×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Ok, I'm officially at my wits end. I've written a java class which accepts an array of string objects and returns a string. Here is the prototype in the RPG program:
d ResendOrder pr o extproc(*JAVA:
d 'com.WMS_BPCS_Integrator.ex-
d ecutable.ResendOrder':'main')
d class(*JAVA:'java.lang.String')
d o class(*JAVA:'java.lang.String')
d dim(2)
However, when I call it, I'm receiving the following error:
Cause . . . . . : RPG procedure GWBA09D5 in program MXMLIB/GWBA09D5 received
Java exception "java.lang.NoSuchMethodError: main" when calling method
"main" with signature "([Ljava.lang.String;)Ljava.lang.String;" in class
"com.WMS_BPCS_Integrator.executable.ResendOrder".
NOW HERE'S THE FUNNY PART.
When I pull up the class with javap -s, here's what I get for the signatures:
public class com.WMS_BPCS_Integrator.executable.ResendOrder extends
java.lang.Object{
public com.DelMonte.WMS_BPCS_Integrator.executable.ResendOrder();
Signature: ()V
public static java.lang.String main(java.lang.String[]);
Signature: ([Ljava/lang/String;)Ljava/lang/String;
}
Notice how the signatures match? So do I.
This class works just fine as long as I don't try to RETRIEVE a parm. Removing the return value from both the prototype and the class has the class running normally.
So...is it possible to actually prototype a java class so that it actually does return a value to the calling RPG program, or am I banging my head against the wall for nothing?
I've tried everything that I can think of so far. I even tried changing it to a *constructor procedure and passing in the parms that way, but it really didn't like that.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.