RPG Program calling Java

IBM iSeries
Ok guys I need some help. Our company just purchased a credit card verification software, its a Java application. I need to have an RPG/ILE program call this JSP passing and returning parms. I know very very little about Java, was wondering if anyone had examples of how to code this. Thanks John

Answer Wiki

Thanks. We'll let you know when a new response is added.

Another iSeries user wrote the editors of Search400.com with this suggestion:

First of all, ask your reseller for a correct (ie RPG, of course) running sample, or negotiate a rebate.

Then you can try something like they did in these pages. (It is an HSSF Java project with RPG, working correctly but too expensive in processor resources.):





— Michelle Davidson, editor, Search400.com

Discuss This Question: 2  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • MichelleDavidson
    Jason Hickmott also sent us these comments: "The short answer is that a RPG program cannot call a JSP. You can construct a URL with parameters and parse the resulting HTML. I have done this recently in Java. In my case, the external application was designed to work this way. Usually this kind of solution is bad because it is similar to screen scraping. When the UI is changed, your application will break. My RPG is a little bit rusty so I?m not sure if there is an API for constructing URLs. Perhaps the IBM XML parser could be used to parse the HTML? "Instead of a brittle HTML parsing solution and if your company can provide a Java resource, then perhaps you may wish to consider the following. A Java application can have different types of clients. The UI with its JSPs is one of them; your RPG application is another. An RPG program cannot directly invoke a Java class in a J2EE application. Instead you must go RPG -> Java ?> J2EE. The plain Java bit in the middle is deployed onto an AS/400. An example of this is the Business Delegate pattern (http://java.sun.com/blueprints/corej2eepatterns/Patterns/BusinessDelegate.html). All you need to do in your RPG application is call the Java methods as subprocedures." -- Michelle Davidson, editor, Search400.com
    515 pointsBadges:
  • TomLiotta
    There does need to be some clarification. The question title is about "calling Java". The question text asks how to "call this JSP". Which is it? Tom
    125,585 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: