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













Hi Everyone,

I am currently involved in enhancing an AS/400 application written in RPG, which receives data in from a web application via data queues. The business has decided to make this traffic two-way, and made a unilateral decision to create a synchronisation service to prevent contention, accessed from the As/400 via an RPC module written in Java.

As the only programmer in the department to have ever written any ILE RPG, I was assigned to write the RPG to communicate with this Java procedure, something I've never done before.

The class is defined in a package as com.axa.rpc.RpcClient, held in a JAR file in an ifs folder on the machine.

I have used the ADDENVVAR command to set the CLASSPATH to point to the ifs folder, and the following RPG code to define the required method to RPG (sorry about the formatting)

D RpcClient PR O EXTPROC (*JAVA:'com.axa.rpc.RpcClient'
D :'execute')
D STATIC
D CLASS(*JAVA:'java.lang.String')
D s_dest O CLASS(*JAVA:'java.lang.String')
D xml_call O CLASS(*JAVA:'java.lang.String')
*
* Call External Service using Remote Procedure Call
* -------------------------------------------------
*
D str S O CLASS(*JAVA:'java.lang.String')
D str2 S O CLASS(*JAVA:'java.lang.String')
D str3 S O CLASS(*JAVA:'java.lang.String')
*
* Java String Objects
* -------------------
*
D makestring PR O EXTPROC(*JAVA:'java.lang.String':
D *CONSTRUCTOR)
D CLASS(*JAVA:'java.lang.String')
D parm 65535A CONST VARYING
*
* Construct a Java string using input parameter
* ---------------------------------------------

and the following statement to call the method;

C eval str = makestring(xml_in)
C eval str2 = makestring(output)
C eval str3 = makestring('mainframe')
C eval str2 = RpcClient(str3 :str)
C eval xml_out = makealpha(str2)

The calls to the String constructor, and the makealpha (String.getBytes) work fine, but the call to RpcClient gives Class Def Not Found error.

I'm sure its an environmental thing, but any solutions would be gratefully received.

Regards,
Neil

_________________________________________________________________
MSN Instant Messenger now available on Australian mobile phones. Go to http://ninemsn.com.au/mobilecentral/hotmail_messenger.asp


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.