Ok.
I'm officially at my wits end.
I've written a java class that accepts two strings and returns a string. Here is the prototype I've written for it in the RPG program:
Here's the procedure call:
Here's the error I get when I try to run it:
NOW HERE'S THE FUNNY PART:
When I pull up the class with javap -s, here's what I get:
Press ENTER to end terminal session.
Note the parts bolded and in red? Those match.
So...is it possible to actually invoke a java class in an RPG program and return a value, or am I just banging my head against the wall for nothing?
Thanks!
I'm officially at my wits end.
I've written a java class that accepts two strings and returns a string. Here is the prototype I've written for it in the RPG program:
Code:
d ResendOrder pr o extproc(*JAVA: d 'com.DelMonte.WMS_BPCS_Integrator.ex- d ecutable.ResendOrder':'main') d class(*JAVA:'java.lang.String') d static d o class(*JAVA:'java.lang.String') d const d o class(*JAVA:'java.lang.String') d const
Code:
ReturnMsg=ResendOrder(string(wmfac):string(charOrd)); (ReturnMsg is defined as follows: d ReturnMsg s o class(*JAVA:'java.lang.String'))
Code:
Message ID . . . . . . : RNX0301 Date sent . . . . . . : 03/08/11 Time sent . . . . . . : 10:22:34 Message . . . . : Java exception received when calling Java method. Cause . . . . . : RPG procedure GWBA09D5 in program MXMLIB/GWBA09D5 received Java exception "java.lang.NoSuchMethodError: main" when calling [B][COLOR="red"]method "main" with signature "(Ljava.lang.String;Ljava.lang.String; )Ljava.lang.String;" [/COLOR][/B]in class "com.WMS_BPCS_Integrator.executable.ResendOrder".
When I pull up the class with javap -s, here's what I get:
Code:
public class com..WMS_BPCS_Integrator.executable.ResendOrder extends java.lang.Object{ public com.WMS_BPCS_Integrator.executable.ResendOrder(); Signature: ()V [B][COLOR="red"]public static java.lang.String main(java.lang.String, java.lang.String); Signature: (Ljava/lang/String;Ljava/lang/String; )Ljava/lang/String; [/COLOR][/B] }
Note the parts bolded and in red? Those match.
So...is it possible to actually invoke a java class in an RPG program and return a value, or am I just banging my head against the wall for nothing?
Thanks!
Comment