Webutil_file_transfer.AS_To_Client_With_Progress
Hi,
I'm using webutil on Forms 6i.. When using webutil_file_transfer.AS_To_Client_With_Progress to download files from the server using the following comand :
v_boolean := webutil_file_transfer.AS_To_Client_With_Progress
(:b1_1.client_file_path||:b2_1.file_name,
:b1_1.server_file_path||:b2_1.file_name,
NULL,
NULL);
I get either a
WUT-118 error - Application server file does not exist or is of zero length
(no file transfer occurs)
or
WUT-100 error - Bad file information string c:\temp\file_name.log|88570|N|Y||
(The error comes up but the file actually transfers?)
In both cases the files do exist and I have access rights to both directories.
Any clues/fix much appreciated
Hi,
You can try as follows in your webutil.cfg file:
transfer.database.enabled=TRUE
transfer.appsrv.enabled=TRUE
transfer.appsrv.workAreaRoot=
transfer.appsrv.accessControl=FALSE
transfer.appsrv.read.1=
transfer.appsrv.write.1=
In formsweb.cfg you might have:
[webutil]
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
baseHTMLjinitiator=webutiljini.htm
baseHTMLjpi=webutiljpi.htm
archive_jini=frmall_jinit.jar,frmwebutil.jar,jacob.jar
archive=frmall.jar
lookAndFeel=oracle
userid=user/pwd@mbcprod10g
width=100%
height=100%
then try with the following link:
http://localhost:8889/forms/frmservlet?config=webutil&form=<Form_Name>
Hopefully it will work.
Regards
Kausar Iqbal
Similar Messages
-
Hi,
I have the following problem: I want to transfer a file from the application server to the client. I use the following code:
DECLARE
l_cache_filename VARCHAR2(150) := 'Q:\OracleReportsTemp\123.html';
l_report_desname VARCHAR2(150) := 'C:\pcedownload\456.html';
BEGIN
IF NOT webutil_file_transfer.is_as_readable(l_cache_filename)
THEN
message('error in configuration');
ELSE
IF NOT webutil_file_transfer.as_to_client_with_progress(l_report_desname, l_cache_filename, 'Transferring to '||l_report_desname, 'Transferring to '||l_report_desname)
THEN
message('error while transferring');
END IF;
END IF;
END;
The file Q:\OracleReportsTemp\123.html exists on the application server and the directory C:\pcedownload exists on the client PC.
This is the extract from webutil.cfg from the application server:
transfer.database.enabled=FALSE
transfer.appsrv.enabled=TRUE
transfer.appsrv.workAreaRoot=Q:\OracleReportsTemp
transfer.appsrv.accessControl=TRUE
transfer.appsrv.read.1=Q:\OracleReportsTemp
Although this code works fine on my local OC4J, webutil_file_transfer.as_to_client_with_progress always return FALSE on the Application Server. The function webutil_file_transfer.is_as_readable returns true on both environments. Other webutil function such as client_text_io also work fine on both environments.
Versions:
Forms 10g Release 2
Application Server 10g Release2 using OID and SSL
Webutil 1.0.6
Jinitiator 1.3.1.22Hi,
You can try as follows in your webutil.cfg file:
transfer.database.enabled=TRUE
transfer.appsrv.enabled=TRUE
transfer.appsrv.workAreaRoot=
transfer.appsrv.accessControl=FALSE
transfer.appsrv.read.1=
transfer.appsrv.write.1=
In formsweb.cfg you might have:
[webutil]
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilLogging=off
WebUtilLoggingDetail=normal
WebUtilErrorMode=Alert
WebUtilDispatchMonitorInterval=5
WebUtilTrustInternal=true
WebUtilMaxTransferSize=16384
baseHTMLjinitiator=webutiljini.htm
baseHTMLjpi=webutiljpi.htm
archive_jini=frmall_jinit.jar,frmwebutil.jar,jacob.jar
archive=frmall.jar
lookAndFeel=oracle
userid=user/pwd@mbcprod10g
width=100%
height=100%
then try with the following link:
http://localhost:8889/forms/frmservlet?config=webutil&form=<Form_Name>
Hopefully it will work.
Regards
Kausar Iqbal -
Problem in downloading a file from AS to client through form using webutil
I am running oracle 10g sever & devloper 10g in the same machine. Almost every thing is working properly from a client PC in the network except the following aspect :-
From client pc, through form, I have created one export(dmp file) which is being saved in the AS. Now I want this file to be downloaded from AS to this client PC.
I have tried webutil_file.copy_file(server_filename,client_copy_name) which is not working. the error trace file says "Unable to open source file in server" & "Unable to read WebUtil configuration file".
I have also tried webutil_file_transfer.AS_to_Client_with_progress
which results in unsuccessful from server to client.
I modified the webutil.cfg file as :=
transfer.database.enabled=TRUE
transfer.appsrv.enabled=TRUE
transfer.appsrv.accessControl=FALSE
transfer.appsrv.workAreaRoot=D:\temp
transfer.appsrv.read.1=D:\temp
transfer.appsrv.write.1=D:\temp
Please help me out from this situationhi
Welcome to OTN.
try to use.
Client_host()sarah -
Saving PDF report on Client machine
Dear All,
I have one form where the user can select the path he want to save PDF report (generated by Report Bulder) to (I am using Webutil). I set that path as DESFORMAT before calling the repot but when the report is run, it is saved on server (Application server) if the same path exists on server (e.g; c:\temp), otherwise it gives error.
How i can do this?
RegardsHello,
I would guess that all the pdf files you are generating in AS in c:\temp directory. Otherwise if files are in c:\temp\data then you will have to change in the webutil.cfg file. So, according to your webutil.cfg file the function call can be like this..
lResult := WEBUTIL_FILE_TRANSFER.AS_TO_CLIENT_WITH_PROGRESS
('C:\TEMP\ABC.TXT',
'C:\TEMP\ABC.TXT',
'TITLE',
'PLEASE WAIT...');Or otherwise if the files are in C:\TEMP\DATA then change the config setting to the below and try the function as below...
transfer.database.enabled=TRUE
transfer.appsrv.enabled=TRUE
transfer.appsrv.workAreaRoot=
transfer.appsrv.accessControl=TRUE
transfer.appsrv.read.1=c:\temp\data
transfer.appsrv.write.1=c:\temp\dataAnd function like this...
lResult := WEBUTIL_FILE_TRANSFER.AS_TO_CLIENT_WITH_PROGRESS
('C:\TEMP\data'ABC.TXT',
'C:\TEMP\ABC.TXT',
'TITLE',
'PLEASE WAIT...');Make sure that file is readable on the AS and the directory C:\TEMP is available on the client side.
Using example you can find in webutil demo. Check the below link.
http://www.oracle.com/technology/products/forms/htdocs/webutil/webutil.htm
-Ammad -
How can i transfer more than one file from server to client
Hi,
our requirement is transfer more than one files from server to client using the
webutil_file_transfer.as_to_client_with_progress.One file transfer is already working in our system.If anybody know the solution please inform
regards
matjust an idea ...
for this purpose let us put aside security concerns and other potential problems....
-- Get the content of a server directory with Filter and create zip file
1) create a class that implements java.io.FilenameFilter ...
2) define accept() method ...
3) call File.list() with the filter as a parameter. The returned array of strings will have all the names that passed through the accept() filter
4) use java.util.Zip to create ZIP file on the server side
-- I think it is better to create this functionality as a separate Java class, put it in required folder and after it
-- use Forms->Program->"Import Java class" to create pl/sql wrappers, than to create wrappers for all classes and code in pl/sql
5) use webutil to transfer file on the client
6) use Java on client side to unzip transferred file
if you think this is not too complicated, you should try ...
Regards,
Vladimir -
11gR2- webutil upload file to AS on two nodes RAC?
Hellow experts plz help with the following issue,
we are using 11gR2 forms on two node rac,webutil configured on both nodes. upload/download files to AS folder(UP_FILES) using our forms. node 2 is actually replica of node 1(forms,reports,UP_FILES). we are now facing a problem that the form which upload file to AS, only upload that to the node from where it is running say if it is running from node1 then it upload files to folder UP_FILES on that node( as the entry in webutil.cfg file) but we want that UP_FILES folder should be synced with each other on both nodes and a form running whether from node1 or node2 upload the file to both nodes at time.
How this will be accomplished?
--------webutil.cfg entry
transfer.appsrv.read.3=D:\UP_FILES
transfer.appsrv.write.3=D:\UP_FILES
-----FORM UPLOAD CODE
IF :CONTROL.FILE_LOC IS NOT NULL THEN
acyr3 := :CONTROL.TXTVOUCHERNO||'-'||acyr2 ;
FILE_RESULT := WEBUTIL_FILE_TRANSFER.CLIENT_TO_AS_WITH_PROGRESS(CLIENTFILE=>:CONTROL.FILE_LOC,
SERVERFILE =>'D:\UP_FILES\'||acyr3||'.PDF',
PROGRESSTITLE=>'UPLOAD TO DATABASE IN PROGRESS',
PROGRESSSUBTITLE=>'PLEASE WAIT' );
END IF;
--FORM DOWNLOAD CODE
FILE_RESULT := WEBUTIL_FILE_TRANSFER.AS_TO_CLIENT_WITH_PROGRESS
CLIENTFILE=>'D:\UP_FILES\'||acyr3||'.PDF',
SERVERFILE =>'D:\UP_FILES\'||acyr3||'.PDF',
PROGRESSTITLE=>'DOWNLOAD FROM DATABASE IN PROGRESS',
PROGRESSSUBTITLE=>'PLEASE WAIT'
CLIENT_HOST('rundll32.exe url.dll,FileProtocolHandler D:\UP_FILES\'||acyr3||'.PDF');
IF FILE_RESULT THEN
message('File downloaded successfully from the Application Server');
END IF;Well, you're uploading the file to one node, so this is no surprise. What you can do is to store your file on a shared folder (which might be a bit tricky on windows) or synchronize a folder between your nodes. Unfortunately Forms can't access ASM directly (assuming you are using ASM), so you can't store your files directly in ASM where it would be accessible from both nodes.
cheers -
Strange behaviour in ORacle Forms Webutil 106 / Error message WUC-14 WUC-12
This is to inform you about a strange behaviour in Webutil V1.0.6
Hosting environment is Oracle Application Server 10.1.2.0.2 on Unix Solaris 10
Oracle Server 10.2.0.4.0 Enterprise Edition
Client-envionment : Windows 2000, IE 6
I created an Forms based application which reads in certain text files into the database using
Webutil. The data will get changed using the application with logic and lateron a different textfile
will be transmitted using either ftp or it may be created on the client side (again with Webutil).
This solution worked perfect for some time (a year or so) using CLIENT_TEXT_IO...
Hoewever, during the week, I recognized users coming up with the statement that the download
to the local client does not worked anymore in certain situations. The system is producing an error-msg
on the Form in the following sequence :
WUC-14 [getFromObjectCache] ...
WUC-14 [getFromObjectCache] ...
WUC-12 [FileFunctions.newLine()] ...
I traced the session and traced WebUtil, was able to reproduce the problem but could not find out the source
of it in the first place.
Hoewever, it came out, that part of the file being created on the client is a "¿" sign : hex :$BF
This was already part of the file being read in the first place, so the value is stored in the database.
There is no problem when reading a file having a content like this with CLIENT_TEXT_IO but there obviously is one
when writing it to the local client.
The file is getting processed on the client and gets closed with CLIENT_TEXT_IO.FCLOSE.
After the FCLOSE statement is getting processed, the above errors occurs, The length of the produced file is then : 0 bytes ^^
Whenever facing a problem like this check the content of the file you are trying to create.
Workaround was :
- set workingDirectory in formsweb.cfg
- using Forms based TEXT_IO rather than CLIENT_TEXT_IO to create the file on the backend side (Apps-server)
- implement WEBUTIL_FILE_TRANSFER.AS_To_Client_With_Progress to download the file to the client
In order to make it a little bit "colourful" I implemented a bean with progressbar when creating the file on the back end side
Works perfect... and looks nice :)XeM wrote:
Hi Andreas,
install.syslib.location.client.0=webutil\syslibi found the above line over google but when i check my webutility configuration file i didn't found it there. I added this line after the line i have mentioned in previous post but this also not worked. And then i worked on changing permission over folder.
HI XeM
Your adding location is ok. But i suggest try something different. Change the above line to
/* i'm confuse with the \ or / *\
install.syslib.location.client.0=\webutil
or
install.syslib.location.client.0=/webutilAnd do the following work In the client
1. Close ALL open browsers.
2. On the client machine search all directories for webutil.*properties and delete all instances of that file.
3. Delete d2kwut60.dll, JNIsharedstubs.dll, and jacob.dll from the JRE\bin directory.
4. Clear the JRE jar cache. This can be done several ways, but using the Java Control Panel is likely the easiest and safest.
Now stop the OC4J instance and start again and try at client...
Hope this works...
If works... please post the solutions.
Hamid -
Question on transfer.appsrv.workAreaRoot usage
Hi,
webutil.cfg in our QA server (Linux) has an invalid/incorrect directory assigned to transfer.appsrv.workAreaRoot. I have a a call in my forms to webutil_file_transfer.AS_to_Client_with_progress which is failing even though the source and target folders/files passed are valid and also matches what is defined in transfer.appsrv.read.2 and transfer.appsrv.write.2
As per the documentation, transfer.appsrv.workAreaRoot is used when files are UPLOADED FROM client machine. But in my case I am only downloading from AS and uploading to client. Can the reason for failure be the invali/incorrect folder defined in transfer.appsrv.workAreaRoot? Does this mean that transfer.appsrv.workAreaRoot is also used for uploading TO client machine as opposed to uploading FROM client machine (as per the documentation)?If you are using the file upload or file download or read image file or write image file, a valid directory must be listed. This directory must have read/write access. If you are interested in how it works take a look at webutil.pll as this is where transfer.appsrv.workAreaRoot is read and used.
-
What port or protocol uses webutil to transfer files?
Method:
webutil_file_transfer.AS_To_Client_With_Progress
or
webutil_file_transfer.URL_To_Client_With_Progress
is it possible to get files from https with webutil_file_transfer.URL_To_Client_With_Progress as well?David,
teh answer is yes. WebUtil uses the internal Forms communication channel to stream files to the client. You can call it "Forms tunneling" if you like, because this is what it does.
Frank -
How to download/save report from server machine to client machine?
Hello All
This is San,
My problem is that i need to save pdf/html report in client machine while report running on client machine for this i have set destype as file and desformat as pdf/html.
It is running and save automatically while report run on server machine (Application Server OS is Windows 20003 professional) but when i run it on client machine (Client machine OS is XP sp2) click on run button to run report then it give message as
FRM-41214: Unable to run report
When I do showjobs then it give message as
Executed successfully but there were some errors when distribute the output<br>
Please suggest me solution of the above mentioned.
I am waiting for your reply.
Thanks in Advance
Edited by: user8752210 on Feb 11, 2011 11:46 PMHello Mr.
Thanks for quick reply.
The e:\tempReport directory is on both app-server and client and it is shared folder, i am sending procedure that i have used as:
PROCEDURE DOWNLOAD_AS IS
l_success boolean;
l_bare_filename varchar2(50);
BEGIN
--l_bare_filename := substr(:upload.file_name,instr(:download.file_name,'\',-1)+1);
l_success := webutil_file_transfer.AS_to_Client_with_progress
(clientFile => :GLOBAL.PATH3||:global.tmp--(\\client_ip_address\e:\tmpreports\file_name.html it is shared folder)
,serverFile => :GLOBAL.PATH2||:global.tmp--\\server_iip_address\e:\tmpreports\file_name.html it is shared folder)
,progressTitle => 'Download from Application Server in progress'
,progressSubTitle => 'Please wait'
if l_success
then
message('File downloaded successfully from the Application Server');
else
message('File download from Application Server failed');
end if;
exception
when others
then
message('File download failed: '||sqlerrm);
END;
Please suggest me what to do.
Thanks -
Edited pdf saving on server machine
Hi,
I am displaying pdf file on client machine from server using byte array object in visual studio 2005 ,after editing the pdf content using live cycle, i want to save a copy of the edited pdf on server, is any idea for saving it in server,Please provide a solution or give a sample code , i am waiting for ur reply.Hello,
I would guess that all the pdf files you are generating in AS in c:\temp directory. Otherwise if files are in c:\temp\data then you will have to change in the webutil.cfg file. So, according to your webutil.cfg file the function call can be like this..
lResult := WEBUTIL_FILE_TRANSFER.AS_TO_CLIENT_WITH_PROGRESS
('C:\TEMP\ABC.TXT',
'C:\TEMP\ABC.TXT',
'TITLE',
'PLEASE WAIT...');Or otherwise if the files are in C:\TEMP\DATA then change the config setting to the below and try the function as below...
transfer.database.enabled=TRUE
transfer.appsrv.enabled=TRUE
transfer.appsrv.workAreaRoot=
transfer.appsrv.accessControl=TRUE
transfer.appsrv.read.1=c:\temp\data
transfer.appsrv.write.1=c:\temp\dataAnd function like this...
lResult := WEBUTIL_FILE_TRANSFER.AS_TO_CLIENT_WITH_PROGRESS
('C:\TEMP\data'ABC.TXT',
'C:\TEMP\ABC.TXT',
'TITLE',
'PLEASE WAIT...');Make sure that file is readable on the AS and the directory C:\TEMP is available on the client side.
Using example you can find in webutil demo. Check the below link.
http://www.oracle.com/technology/products/forms/htdocs/webutil/webutil.htm
-Ammad -
Specify directory with AS_TO_CLIENT
Hello,
Is it possible to specify the client side download directory with AS_TO_CLIENT?
ThanksSorry about that, I was under the impression that clientFile was only specifying the filename to the client not the directory. I got it to work very smoothly, and added user input to select the download path with the following code:
declare
l_filename varchar2(200);
FLAG BOOLEAN;
begin
l_filename := webutil_file.file_save_dialog
(directory_name => 'C:\'
,file_name => :data_block.file_name // Displays filename.type (test.txt)
,file_filter => null
,title => 'Select client side filename where App Server file will be saved');
FLAG:=WEBUTIL_FILE_TRANSFER.AS_TO_client_with_progress(l_filename , :data_block.file_location || :data_block.file_name, 'Downloading File...', 'Please Wait');
message('The image has been saved to ' || l_filename);
END;
Thanks again for the help, I really appreciate what you do for the development community.
-Jordan -
Webutil_file_transfer.AS_To_client
Hello,
The webutil_file_transfer.AS_To_client only works in ascii mode. Therefore on Unix we add the command unix2dos to workaround this problem.
The code is as follows:
if upper(get_application_property(operating_system))
not like '%WIN%'
then
host('unix2dos '||g_ap_directory||g_file_name
||' '||g_ap_directory||g_file_name);
end if;
if not webutil_file_transfer.AS_To_Client
( user_preferences.get_output_directory||g_file_name
, g_ap_directory||g_file_name
then
end if;
This works fine the first time the code is executed. The second time the code fails. The unix2dos does not do the job. When we do not do the file transfer it does work ok.
Looks like the webutil_file_transfer.AS_To_Client prevents other actions on the AS.
Any ideas?
Regards ErikYou may need to clear your variables and find some way to reset everything after the function is complete. That would be my first guess. Nothing is jumping out at me from the code at the moment.
-
Webutil_file_transfer causes blank forms window on second monitor
Hi,
Forms 11.1.2.0.0 64 bit
Java 1.6.0_31
When using webutil_file_transfer.client_to_db_with_progress or db_to_client_with_progress to load/view a document an intermittent fault occurs. If the Forms window is running on a second monitor then the forms window goes blank while the document up/downloads, and does not return unless dragged to the first window. The problem does not occur every time, and never when only one monitor is used. Maximizing the forms window also seems to cure the problem, but this is not a feasible option.
Any help greatly appreciated.
Nick.Hi,
Forms 11.1.2.0.0 64 bit
Java 1.6.0_31
When using webutil_file_transfer.client_to_db_with_progress or db_to_client_with_progress to load/view a document an intermittent fault occurs. If the Forms window is running on a second monitor then the forms window goes blank while the document up/downloads, and does not return unless dragged to the first window. The problem does not occur every time, and never when only one monitor is used. Maximizing the forms window also seems to cure the problem, but this is not a feasible option.
Any help greatly appreciated.
Nick. -
Webutil_file_transfer and host command doesn't work
I use a host command in forms to execute a sql-script, which creates a file on AS. After the host command I use webutil_file_transfer to ftp the created file to the client. If I try to do this again in the same session, the host command fails. I have to restart the application to get it working again. If I leave out the webutil_file_transfer I have no problems whatsoever. It looks like webutil is changing something perhaps in the environment. Anyone has the same problem (and a suitable solution)?
I can remove the files on AS (so there seems to be no lock). After removal of the files, no new files wil be created, even if I change the name of the file that needs to be created. Only restarting the application helps.
Raoul
Maybe you are looking for
-
Copying report file from one server to another requires refresh database?
Hi, I am using Crystal Reports 11 for development. We have a number of crystal reports that are served on a web server running classic ASP that uses these reports with Embedded Crystal Server XI installed on the server. When I am developing or modify
-
How do I repair a Windows 7 partition when it is after Windows 8 partition in a Dual Boot Setup
I have a laptop that I purchased a year ago and which came pre-installed with Windows 8. Recently, I successfully added Windows 7 as a dual-boot, and this worked OK. To obtain the space for Windows 7, I shrunk the Windows 8 partition. In Disk Managem
-
Use of Official Document number in VAT Books for Italy
Dear All, I would like to share with you a big doubt I have regarding the use of Official Document Number in the VAT Books. This is a requirement for an Italian client. According to my clients requierement they would like to manage 5 different VAT Bo
-
NetWeaver XI components are not talking to each other
I am an XI consultant, i dont have proper Basis support at my client, since they are fond of only ABAP stack. They installed netweaver xi from the market place. I am unable to import any SWCV (even SAP BASIS) from SLD to IR and IR menu is blank. Una
-
Check table in data type AFNAM (Name of Requisitioner/Requester)
Hello, To satisfy a customer's requirement, I changed data type AFNAM so that it would have a search help. The search help name of this data type now points to the ZAFNAM view - this view is based on table ZQQPVS001, where I keep the valid entries fo