× 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.



Paul,

Thanks, yea I got that to work. But the profile Token I'm converting is
coming back as invalid. I think it has something to do with the differences
between the ASCII and EBCDIC character sets.

Thanks,

Mark

Mark D. Walter
Senior Programmer/Analyst
CCX, Inc.
mwalter@xxxxxxxxxx
http://www.ccxinc.com


                                                                           
             "Paul Morgan"                                                 
             <pmorgan@jjillgro                                             
             up.com>                                                    To 
             Sent by:                  rpg400-l@xxxxxxxxxxxx               
             rpg400-l-bounces@                                          cc 
             midrange.com                                                  
                                                                   Subject 
                                       Re: Calling Java Method from within 
             02/25/2005 10:14          RPG                                 
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
              RPG programming                                              
              on the AS400 /                                               
                  iSeries                                                  
             <rpg400-l@midrang                                             
                  e.com>                                                   
                                                                           
                                                                           




Mark,

Your decode procedure prototype should take a string class as a parameter
instead of the ...base64 class.  It's trying to find a decode function that
accepts such a class and can't find it.

Paul


--
Paul Morgan
Senior Programmer Analyst - Retail
J. Jill Group
100 Birch Pond Drive, PO Box 2009
Tilton, NH 03276-2009
Phone: (603) 266-2117
Fax:   (603) 266-2333
<MWalter@xxxxxxxxxxxxxxx> wrote in message
news:OFB37A2270.C97FC695-ON85256FB3.004D9EAC-85256FB3.004E31D2@xxxxxxxxxxxxxxxxx
.
> I'm trying to call a Java method to Decode a Base64 string from within an
> RPG Subprocedure.
> javap -s shows this:
>  $
>  javap -s com.twiek.Utils.Base64
>  Compiled from Base64.java
>  public final class com.twiek.Utils.Base64 extends java.lang.Object {
>      public static final java.lang.String encode(java.lang.String);
>          /*   (Ljava/lang/String;)Ljava/lang/String;   */
>      public static final java.lang.String decode(java.lang.String);
>          /*   (Ljava/lang/String;)Ljava/lang/String;   */
>  }
>  $
>
> I'm assuming that this means that the method deocde accepts a java string
> object and returns a java string object.
>
> Here is my code.
>      Hoption(*nodebugio:*srcstmt) NOMAIN  thread(*serialize)
>
>      DdecodeBase64     PR         32767    varying
>      D inputString                32767    const
>
>      DstringObject     S               O
class(*JAVA:'java.lang.String')
>
>      Dbase64Class      S               O   class(*JAVA:'com.twiek.Utils.-
>      D                                     Base64')
>
>      DnewString        PR              O
> extproc(*JAVA:'java.lang.String':
>      D                                     *CONSTRUCTOR)
>      D                            32767a   const varying
options(*varsize)
>
>      DnewBase64Class   PR              O
extproc(*JAVA:'com.twiek.Utils.-
>      D                                     Base64':*CONSTRUCTOR)
>
>
>      Ddecode           PR              O
extproc(*JAVA:'com.twiek.Utils.-
>      D                                     Base64':'decode')
>      D                                     class(*JAVA:'com.twiek.Utils.-
>      D                                     Base64')
>
>
>      DgetBytes         PR         32767a
> extproc(*JAVA:'java.lang.String':
>      D                                     'getBytes') varying
>
>
>
>
>      PdecodeBase64     B                   Export
>      DdecodeBase64     PI         32767    varying
>      D inputString                32767    const
>
>      DoutputString     S                   like(decodeBase64)
>
>       /free
>
>        base64Class = newBase64Class();
>        stringObject = newString(%trim(inputString));
>        stringObject = decode(stringObject);
>        outPutString = getBytes(stringObject);
>
>        return outputString;
>       /end-free
>      P                 E
>
> The base64 class and stringObject instatiate fine but when I get to
calling
> the decode method, I get java.lang.NoSuchMethodError exception.
>
> Any idea why?
>
> Thanks,
>
> Mark
>
> Mark D. Walter
> Senior Programmer/Analyst
> CCX, Inc.
> mwalter@xxxxxxxxxx
> http://www.ccxinc.com
>
> --
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>



--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.