RPG Program calling Java

pts.
Tags:
i5
IBM iSeries
OS/400
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.):

http://www.iseriesnetwork.com/resources/artarchive/index.cfm?fuseaction=viewarticle&CO_ContentID=19278&channel=art&PageView=Search

http://www.iseriesnetwork.com/resources/clubtech/index.cfm?fuseaction=ShowNewsletterIssue&ID=17839

http://www.iseriesnetwork.com/resources/clubtech/index.cfm?fuseaction=ShowNewsletterIssue&ID=19336

http://www.iseriesnetwork.com/resources/clubtech/index.cfm?fuseaction=ShowNewsletterIssue&ID=19277

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

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • 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
    435 pointsBadges:
    report
  • 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:
    report

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following