RPG Program calling Java
0 pts.
0
Q:
RPG Program calling Java
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
ASKED: Jun 16 2005  1:28 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
110 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
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
Last Answered: Jun 21 2005  9:09 AM GMT by MichelleDavidson   110 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

MichelleDavidson   110 pts.  |   Jun 22 2005  9:18AM GMT

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  <a href="http://java.sun.com/blueprints/corej2eepatterns/Patterns/BusinessDelegate.html" title="http://java.sun.com/blueprints/corej2eepatterns/Patterns/BusinessDelegate.html" target="_blank">http://java.sun.com/blueprints/corej2eep…</a>). All you need to do in your RPG application is call the Java methods as subprocedures.”

– Michelle Davidson, editor, <a href="http://Search400.com" title="http://Search400. " target="_blank">Search400.com</a>

 

TomLiotta   8025 pts.  |   Oct 26 2009  6:26AM GMT

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

 
0