Focal Point
WebFocus and Java API

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1971088331

August 09, 2005, 03:19 PM
CHERI
WebFocus and Java API
We are using WF 5.23
I need to develop a webfocus program that will accept a user id and password. Once entered the webfocus program needs to run an existing Java API. The Java API contains valid ids. Can webfoucs run Java APIs ? Has anyone done anything similar to this ?
August 10, 2005, 04:31 PM
dhagen
Yes it can, but it can be a little tricky.

This is a little hard to explain (I haven't had to do this in a couple of years). You need to write your java code to implement "callpgm" from the ibi.callpgm package (don't know what jar). You then have to create a fex that will call the java class as a program, and a subsequent fex to call the origional fex as a eda stored procedure call. Make sence?

example of fex to call java:
-******* Call java server - calljava.fex
SET EXORDER=PGM/FEX
EX &JAVA.EVAL "&P1.EVAL", "&P2.EVAL" , "&P3.EVAL", "&P4.EVAL", "&P5.EVAL"
-EXIT

example of fex to call above fex:
-DEFAULT &JAVA_CLASS=java.com.cgi.mbs.server.ibi.PaymentProfileReport;
-SET FEXNAME='testjava';
-DEFAULT &PARMS='id=|account=|client=00440001';
-* * Call java server via calljava.fex
SQL EDA EX calljava JAVA='&JAVA_CLASS.EVAL',P1='&HOSTID.EVAL',
P2='&PORTID.EVAL',P3='&USERID.EVAL', P4='&SESSIONID.EVAL',P5='&PARMS.EVAL';
-* Get response and hold it in the tmp file
TABLE FILE SQLOUT
PRINT *
END
-RUN

Hope this helps.
August 10, 2005, 06:05 PM
dhagen
Sorry about the above entry. I just re-read your origional post and realized that you need to call the javaapi from the webfocus client, not the server.

This is very easy to do. Get a copy of the security and administration pdf from new york. It explains how to implement java exits from within the webfocus client.
August 10, 2005, 06:48 PM
<DocServices>
Hi Cheri,

You can view, download, and/or purchase the WebFOCUS Security and Administration Manual 5.2.3 (DN4500509.0104) from the Technical Documentation Library.

If you have an InfoResponse ID, login on the Tech Support web site and then access the Library. By logging in first, you can download the PDF file and/or view the HTMLHelp version. You do not need to be logged in with your InfoResponse ID in order to purchase documentation.

You can access the Technical Documentation Library via the following Web sites:




Hope this helps.

Regards,
Jennifer