Webutil Configuration Steps for Oracle Fusion Middleware Forms 11g

March 30, 2017 | Author: thienai | Category: N/A
Share Embed Donate


Short Description

Download Webutil Configuration Steps for Oracle Fusion Middleware Forms 11g...

Description

Webutil Configuration steps for Oracle Fusion Middleware Forms 11g R2 January 28, 2013 by oramax Leave a comment

Goal: How to Configure Webutil Library in Fusion Middleware Forms 11g (11.1.2.0). The Webutil utility is largely configured in your 11g Forms installation. However, there are some additional steps you will need to accomplish in order to make it work properly. Additional Webutil components maybe needed in order to configure Webutil for development purposes. These Components are: 1-

Jacob Package 1.14.3 for (11.1.2.0)

You can found this package on mentioned below URL: Download In this package, there are three files: 1-

Jacob.jar

2-

jacob-1.14.3-x64.dll

3-

jacob-1.14.3-x86.dll

Before Using the Above mentioned files, Follow the steps mentioned below to create Webutil user in Database. 1-

Login from SYS

2-

CREATE USER Webutil IDENTIFIED BY Webutil (Already Created in 11g)

3-

Grant connect, resource to Webutil

4-

Connect Webutil/Webutil

5Run create_webutil_db.sql from/Weblogic/weblogic_10.3/Middleware/Oracle_FRH ome1/forms/ 6-

Create public synonym webutil_db for webutil.webutil_db;

7-

Connect sys as sysdba

8-

Grant execute on webutil_db to public;

Now Place the Jacob.jar into /Weblogic/weblogic_10.3/Middleware/Oracle_FRHome1/forms/java Directory. Place Jacob-1.14.3x64.dll into/weblogic/weblogic_10.3/Middleware/Oracle_FRHome1/forms/webutil/win6 4 Directory. Place Jacob-1.14.3x86.dll into/weblogic/weblogic_10.3/Middleware/Oracle_FRHome1/forms/webutil/win3 2 Directory. Create a backup of sign_webutil.sh with different name, this file can be found in /Weblogic/weblogic_10.3/Middleware/asinst_1/bin Directory Page | 1

Open sign_webutil.sh file in notepad and search for line. Replace it with “welcome1”. Similarly search for < Your private key password > line and replace it with “welcome1”. Save the file to the same directory after Editing. Now run the Following command to sign both files with Jacob.jar and frmwebutil.jar files [oracle@earth bin] $ ./sign_webutil.sh /Weblogic/weblogic_10.3/Middleware/Oracle_FRHome1/forms/jav a/Jacob.jar [oracle@earth bin] $ ./sign_webutil.sh /Weblogic/weblogic_10.3/Middleware/Oracle_FRHome1/forms/jav a/frmwebutil.jar After Jar Signing, Go to Browser and type the following command to open Oracle Fusion Middleware Console. http://userid=username/password@sid:7001/em Add /Weblogic/weblogic_10.3/Middleware/Oracle_FRHome1/forms/java/frmall.jar path into CLASSPATH Variable Default.env Or Add Manually By using following command: [oracle@earth bin] $ vi .bash_profile Add /Weblogic/weblogic_10.3/Middleware/Oracle_FRHome1/forms/java/frmall.jar path into CLASSPATH variable in bash_profile. Regenerate the webutil.pll using following command: [oracle@earth bin] $ Frmcmp.sh module=webutil.pll module_type=libraryuserid=username/password@sid compile_all=yes Open & Edit the Following Parameters in formsweb.cfg, it can be found in: /weblogic/weblogic_10.3/Middleware/user_projects/domains/webforms_domain/confi g/fmwconfig/servers/WLS_FORMS/ applications/formsapp_11.1.2/config Directory. Archive= frmall.jar, frmwebutil.jar Modification in [Webutil] Section: WebUtilArchive=frmwebutil.jar, jacob.jar Archive=frmall.jar, frmwebutil.jar, jacob.jar Save the formsweb.cfg after editing. Install a VNC Client on Windows to create Linux client session on Windows because linux do not support drag & Drop functions in Oracle Form 11g. Open Oracle forms builder 11g on Linux client, Create a new form,a new block & a canvas. after that attach webutil.pll on Navigator—> Attached Libraries in Forms that you have compiled earlier. Page | 2

Attach Webutil.olb in Object Libraries in oracle Forms. Open WebUtil.olb file Object group in builder and copy or subclass it into your form. Create a Button (B1) and a text field (P1) on Already created canvas. Copy & paste the following Code in When Button Pressed Trigger.

Declare v_file varchar2(500); Begin v_file := CLIENT_GET_FILE_NAME (directory_name => 'C:\Forms\Reports', file_name

=>

file_filter

=>

message

=>

dialog_type

=>

NULL, NULL, 'Open a file', OPEN_FILE); :P1:=v_file;

End; Compile & Save the form again. Run the Form and browse any file in your Client PC in order to check the Webutil proper functionality. Note: Browser will ask to certify these libraries first time Choose ALWAYS certify. Check Java Console icon on the task bar and see frmwebtul.jar and jacob.jar are loaded successfully.

Page | 3

How to use Webutil in Oracle Forms 11g to save a file on Oracle AS 11g Stics Post in oracle, oracle forms,Tags: forms 11g, ora11g

Before you go into any development download and try the Webutil Demo first and see how that works in your environment! 1. Add the Webutil library to the form 2. Create a Data Block “COMMAND_LINE” 3. Create a new layout with the following parameters: ?

1

cmd = command-line parameters (data block only)

2

filename = filename to be entered

3

browse = browse for file destination

4

ok_btn = ok button

5

cancel_btn = cancel button

4. Create a Function that will populate the parameters retrieved (this is used later on) ?

1

FUNCTION build_parameter_list(p_user varchar2, p_report varchar2)

2

RETURN varchar2 IS

3 4

v_res varchar2(5000);

5 6

cursor c1 is select *

7 8 9

from report_parameters where user_code = p_user and report_code = p_report;

10 11

v_rec

12

v_filename varchar2(400);

13 Page | 4

c1%rowtype;

14

BEGIN

15

v_filename := :command_line.filename;

16

v_res

:= 'report=' || p_report || '.rdf';

17 18

v_res := v_res || ' userid=' || get_application_property(USERNAME) || '/' || get_application_property(PASSWORD) || '@' ||

19 get_application_property(CONNECT_STRING);

20 21 22 23 24

v_res := v_res || ' server=ReportsServer_DOMAIN-NAME_asinst_1 destype=file desformat=RTF desname="' || v_filename || '" P_USER=''' || p_user || '''';

25 return v_res;

26 end;

27 28 5. Create a trigger on the Browse button (WHEN_BUTTON_PRESSED) ?

1

DECLARE

2

Var_Filename VARCHAR2(256) ;

3 4 5

BEGIN :command_line.filename :=

client_GET_FILE_NAME('c:\temp',null,

6

'Microsoft Word Files (*.doc)|*.doc|' || 'Rich Text Format Files (*.rtf)|*.rtf|',

7

'Select a Destination',"SAVE_FILE", TRUE);

8

message(:command_line.filename);

9

End;

6. Create a trigger on the OK button (WHEN_BUTTON_PRESSED)

Page | 5

?

1

declare

2

AppID

3 4

PLS_INTEGER;

frm_name varchar2(300); vCopied l_success

boolean; boolean;

5 l_bare_filename varchar2(50);

6 7 8

begin frm_name := get_application_property(calling_form);

9 10

if frm_name = 'TESTER_FORM_NAME' then

11

:parameter.p_rep := 'TEST_REPORT_NAME';

12

end if;

13 14

:parameter.p_user := get_application_property(username);

15 16 17 18

if :command_line.filename is null then message('Please enter or specify a filename.'); elsif upper(:command_line.filename) not like '%.DOC' and upper(:command_line.filename) not like '%.RTF' then

19 message('File can only be of type .RTF or .DOC');

20 21 22

else :command_line.cmd := build_parameter_list(:parameter.p_user, :parameter.p_rep);

23 24

AppID := DDE.App_Begin('rwclient.exe ' || :command_line.cmd,

25

DDE.App_Mode_Normal);

26 Page | 6

27

l_success := webutil_file_transfer.AS_to_Client_with_progress(

28

clientFile

=> :command_line.filename,

serverFile

=> 'c:\temp\downloaded_from_as.doc',

progressTitle

=> 'Download from Application Server in progress',

29 30

progressSubTitle => 'Please wait');

31 32 exit_form(no_validate);

33 34

end if; end;

35 36 37 7. Create a trigger on the Cancel button to exit the form

1

exit_form (no_validate);

NOTES: If you get the error: Exception in thread “main” java.lang.UnsatisfiedLinkError: no jacob-1.14.3-x86 in

java.library.path 1. Make sure the property file c:\Program Files\Java\jre6\webutil.DOMAIN_NAME.webutil.properties exists on the client (this is downloaded from the server automatically) and has the library entry of

1

jacob-1.14.3-x86.dll as follows: syslib.jacob-1.14.3-x86.dll=1.14.3

2. Also, it should exist in c:\Oracle\Middleware\as_1\forms\webutil\win32\jacob-1.14.3-x86.dll on the server but if you still get the error above, then also add it to c:\Oracle\Middleware\as_1\forms\webutil\jacob-1.14.3-x86.dll on the server 3. Try downloading the dll directly from the server if you having access problems: Delete the files (d2kwut60.dll, jacob.dll, JNIsharedstubs.dll) if they exist on the client’s JRE dir, so they can be re-downloaded as needed from the server again. 4. Check the library entry in webutil.cfg (C:\Oracle\Middleware\as_1\forms\server\webutil.cfg) on the server (this should match with version on the client): *= dll filename | filesize | library version | true/false

1

install.syslib.0.7.1=jacob-1.14.3-x86.dll|102400|1.14.3|true

Page | 7

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF