Problem reading file after using webutil_file_transfer.as_to_client

Hi all,
The Forms webapplication I'm working on has to talk with a cardreading-application on the client-PC. The communication is carried out by exchanging small files. Reading from the client by Forms on the AS goes well (using client_text_io from webutil). The problem arises when the application has to respond back with a file. The file is made on the AS and then transfered from the AS to the client using webutil_file_transfer.as_to_client. This file can not be read by the cardreading application when the AS is on Linux. Our developement AS server is on a Windows 2000 box and then the communication doesn't show this problem.
If I open the file from the AS on Linux , I can see that there is only 1 long line. The Windows version of the file contains 2 lines (as it should be). It seems that before/during/after the transfer some special characters like carriage return and tab are causing the problem.
Looking in web_file_transfer.as_to_client I see that the procedure reads lines from a temporary file into a buffer. The lines are separated by a CHR(10). Could the transfer from Linux to Windows(DOS) cause a problem with these characters ?
Has anyone experienced this problem ? If someone has a clue this would be very welcome.
We work with :
- Forms and AS 10.1.2.0.2
- Webutil 1.0.6
- Development OS: Windows 2000 (Service Pack 4)
- Production OS: Red Hat Enterprise Linux AS release 3 (Taroon Update 3)
- Client-PC OS: Windows 2000 (Service Pack 4)
Thanx,
Enrico

Without going into a long winded answer, the only thing I can really offer is to say this... If you feel as though your code has been correctly written and you simply cannot identify any other possible solution, add SYNCHRONIZE. In short, its execution acts similar to a reset or refresh button.
Another common place where SYNCHRONIZE has been helpful is when calling RUN_REPORT_OBJECT. For example, if you use the code we offer in the Forms/Reports Integration document you will find that it works very well - most of the time. However, sometimes it fails for what seems to be unexplainable reasons. If you message out the values being assigned you will see that some variable values are not being set even though the code execution has already passed the point where a value should have been assigned. Adding the SYNCHRONIZE just after the point where the value should have been assigned forces the assignment before executing the next line of code. For example,
     v_rep := RUN_REPORT_OBJECT(repid);
     rep_status := report_object_status(v_rep);
In the above code, a request for a report is made followed by a check of its status. At this point you would expect that the status would be something like one of the following:
     'RUNNING', 'OPENING_REPORT', 'ENQUEUED'
However, we have seen instances where the value assigned to the variable would actually be NULL, which of course will make the rest of the code likely fail. By adding SYNCHRONIZE the problem is correctable.
     v_rep := RUN_REPORT_OBJECT(repid);
     rep_status := report_object_status(v_rep);
     SYNCHRONIZE;
It is important to understand, however that using SYNCHRONIZE comes at a price. Each time it is executed a network round-trip occurs which will give the application the appearance of degraded performance. So use this built-in only when you know you must.

Similar Messages

  • Im using xcode 4.6 and im having problems reading files using the fopen function in c

    Im using xcode 4.6 and im having problems reading files using the fopen function in c

    Yes, but that would not cause the "build  failed" message.
    right I missed that part. Looks like two problems then.
    //  main.m
    //  ASCTestFopen
    //  Created by Frank Caggiano on 3/2/13.
    //  Copyright (c) 2013 Frank Caggiano. All rights reserved.
    #import <Foundation/Foundation.h>
    #include <stdio.h> 
    int main(int argc, const char * argv[])
        @autoreleasepool {
            FILE *fp, *fopen();
            // insert code here...
            if((fp = fopen("~/test.txt","r")) == NULL)
                NSLog(@"open failed");
        return 0;
    This will compile ad run in Xcode with a project type of comand line tool

  • Problem using webutil_file_transfer.AS_to_Client

    I have configured webutil package successfully
    I have made the following configuration to webutil.cfg:
    transfer.database.enabled=TRUE
    transfer.appsrv.enabled=TRUE
    transfer.appsrv.accessControl=TRUE
    #List transfer.appsrv.read.<n> directories
    transfer.appsrv.read.1=c:\temp
    #List transfer.appsrv.write.<n> directories
    transfer.appsrv.write.1=c:\temp
    I have the following code:
    BEGIN
         IF NOT webutil_file_transfer.AS_to_Client('C:\temp\saad.pdf', 'C:\temp\saad.pdf') THEN
              message('Upload was not successful');
         ELSE
              message('Upload was successful');
         END IF;
    END;
    I always got "Upload was not successful" can any body tell me what the problem is ?

    Francois Degrelle wrote:
    - be sure that the first argument is the client machine file and the second the server file
    FRancois
    It is OK
    Francois Degrelle wrote:
    - at runtime, display the Java console to see if there is any error message
    FRancois
    No Errors
    Francois Degrelle wrote:
    - try another function in the Webutil_File_Transfert package
    FRancois
    I have tried client_to_db successfully

  • Cannot Open File In Reader 9 After Using CutePDF Writer

    After using CutePDF Writer to output a file from the print screen of Adobe Reader 9.0, I am unable to open it.  I get the error "Adobe Reader could not open 'filename.pdf' because it is either not a supported file type or because the file has been damaged."
    The file shows a Reader icon, but when I view it under Properties, it shows the file size as 0 kb.  Something went wrong on export...
    The file was created using Acrobat Pro 9.0.

    metaphiz wrote:
    After using CutePDF Writer to output a file from the print screen of Adobe Reader 9.0,
    The file was created using Acrobat Pro 9.0.
    You either used Cute or you used Acrobat. Which one?
    If Cute was involved and the file shows 0kb, then it's a CutePDF issue. You'll want to talk to their people about it.

  • Problem with file permissions using Snow Lepord

    I'm having problems with file Sharing & Permissions using Snow Lepord.
    When I save any new file it only has 'Read & Write' privileges for the user, everyone else is 'read only' or 'no access'.
    We have a Netgear NAS Server which is accessed by other users over the local network and if I change the Privilege to 'read & write' via Get Info and then copy the file from my desktop to ther server it changes the Privilege of the server version to 'no access' we then have to change it again for it to work.
    I also created a new folder on the server and now it says 'no access' and has a no entry icon!
    Any ideas???

    We have issues like this. Have tried running AFP and SMB, now connecting using CIFS. All have the same problem. I can work on one or two files fine, then suddenly, one of the files I just worked on says I don't have permissions. I log off the server and log back on, and then I have permissions to the file. It will work fine for one or two operations, then fails. We just updated to OSX Mavericks and a Windows 2012 server, but have been having this issue for years. My permissions look fine. I can even change permissions, but it won't let me work on the file or move or delete the file or rename the file. Once I log out and log back in, I can do anything I want.

  • Problem reading file in tomcat

    Hai I have a problem,
    i am working on project for which we have created a directory in the defaultroot directory of the apache tomcat server.I have written a java program to read a file.Now the problem is coming as to where to put the file and if i want to place that file in the created directory under defaultroot,what path should i give to access this file..
    for eg: i want to put the file test.txt under the folder /defaultroot/test/test.txt then what path should i give in my java program. if i use ../test/test.txt then it says path is not present since using ../ is going into the tomcat directory. i can explicitly give ../defaultroot/test/test.txt but i dont want to hardcode defaultroot. Any suggestions?
    thanks

    U can considering having the path in a property file and using it in the problem

  • HT4889 How do change the ownership of files after using the migration assistant?

    After I copied all of my files across using the migration assistant, the tool is nice enough to assume that I want to use the same ID that I had on my PC.  This is not my case as I am using a different name on the mac.  How do I get the files from the other user name?  I have already set the sharing permissions so that I can see them on both user ids, however the only way I can see to update is to copy them all.  As I have about 1TB of files, this is a little inconvenient.  Any thoughts?

    Thanks.  It got me on the right track.  At the end, I copied the 1TB over and just deleted the other profile.  I tried to set the ownership to my regular ID by removing the lock from "Get Info" but I still had to move them out of the other "user" folder.

  • "Damaged" fonts in pdf file after using TouchUp Text Tool

    Hello,
    I have a question regarding an issue with lost fonts in a pdf file.
    The document was created in Adobe InDesign and printed to pdf.
    However, after using the "TouchUp Text Tool" in order to check the font for a certain text, several attributes of the font have been damaged in the entire pdf: all characters in "small caps" have been transformed to regular.
    We've had 3 cases so far.
    Does anyone know how we can prevent this from happening again?
    When exporting the document to pdf, all fonts were embedded, I am not sure if this can be the cause.
    Thank you in advance for any suggestions!
    Paula

    We are using Adobe 8 Professional.
    Bill@VT, I am not sure what you are asking me
    I have checked the Preferences for the pdf file and the "Use system fonts" case is checked.
    When opening the pdf file, the fonts were ok, but somewhere along the process, the small caps were lost.
    Maybe a print screen will be of use: the presentation above is the correct presentation (the one immediately after exporting to pdf); the presentation below is the one after all fonts were damaged.

  • What to do with dmg files after use

    I've been keeping dmg files in the Shared user folder after downloading the application. I guess I was thinking this was because I didn't have an actual disk in case I needed to reinstall. Now I'm getting a new iMac and want to set it up right. Is it OK to do this? Or should I copy the dmg file onto a CD?
    Thanks!

    a brody wrote: No. But there is also a data loss bug that affects 10.6 and 10.6.1 when it comes to using it with Snow Leopard and PowerPC. I'd rather not venture that path if I don't have to.
    Been trying to find out about that. Searching around for "data Loss bug," saw some items related to "Guest account bug," but can't find anything connected to using PPC with Intel. Can you possibly provide a link where I might read more about that?
    And curious to know if you know if this specific bug, which would, seemingly, have potentially affected all users, was fixed with 10.6.2 or 10.6.3?
    from Wikipedia Article: A bug in Mac OS X versions 10.6 and 10.6.1 which, in rare cases, caused loss of user account data after use of a previously-existing guest account by users ...
    If it was only 10.6. to 10.6.1, even if it is PPC-Intel related, +and if it's been fixed+ , don't see why it would apply to someone Migrating to a new computer, which would almost certainly ship with, at least, 10.6.2 and maybe 3.
    Message was edited by: WZZZ

  • Problems with file upload using AMF or SOAP

    We use your AMF to connect Flex with Ruby on Rails.
    Everything is OK, except file upload.
    We did not find how to upload file using AMF or SOAP RPC from
    Flex. Only to use FileReference.upload().
    The problem is that Flex uses different User-Agent in HTTP
    header for this upload and for SOAP/AMF calls.
    This means that sessions are different. And even if you
    authenticated via SOAP/AMF you can not use it to upload file.
    Could you, please, advice is there any other way to upload
    files from Flex via SOAP or AMF?

    Please, help me on this issue, i am still waiting for someone replying me!

  • Problem locating files after migration from PC to Mac

    I have just migrated files from my PC to my Mac.  I have logged into the new user account but I finder is telling me there are no files located in the new user.
    It also doesnt appear that a "user" folder has been created for the new user which may be the problem.
    Thanks

    Depending on how you migrated the files, your 'old' Windows account should have been created on your MBP.
    How did you migrate the files? Using Migration Assitant? Mac or PC version?
    Clinton

  • Reading file anf using input for main

    Hello Amigos,
    I have the following code but I have my doubts if it will work for what I want. I want to read in a file that will call a method with specific arguments.
    Example:
    Method:
    addTwoNumbers(int oneNum, int twoNum);
    File: sum.txt:
    addTwoNumbers(1,5);
    addTwoNumbers(8,2);
    addTwoNumbers(3,10);
    My confusion starts with the PrintWriter definition. I am not quite sure how to implement it and I don't find an example or online reference about this topic.
    Thanks in advance...
    try
                BufferedReader fileIn  = new BufferedReader( new FileReader("process.txt"));
                String oneLine;
                System.out.println("Reading File...");
              while( ( oneLine = fileIn.readLine( ) ) != null )
                   PrintWriter printWriter = new PrintWriter(new OutputStreamWriter(fileIn.readLine()));
                      printWriter.println(oneLine);
                      printWriter.close();
                      System.out.flush();
                 System.out.println("Done Reading File.");
            }

    It's hard to tell where to start. I'll post a brief example of how to read something in from a text file and use it. It's not robust, but it serves as a starting point, I suppose.
    sum.txt
    1,3
    2,4
    5,6
    SumDemo.javaimport java.io.*;
    public class SumDemo
        public static void main(String[] args)
            new SumDemo().go();
        public void go()
            String fileName = "sum.txt";
            try {
                BufferedReader in = new BufferedReader(new FileReader(fileName));
                String line;
                while ((line = in.readLine()) != null)
                    String[] nums = line.split(",");
                    int x = Integer.parseInt(nums[0]);
                    int y = Integer.parseInt(nums[1]);
                    System.out.println(addTwoInts(x, y));
            catch (IOException ioe) { ioe.printStackTrace(); }
        public int addTwoInts(int x, int y)
            return x + y;
    }

  • Can't update reader - files in use by adobe 8.1

    I have tried to update to adobe reader x as I cannot view some things online.  My computer runs Vista.
    Error message comes up during installation:  Files in use by Adobe 8.1, close these then retry.   Adobe 8.1 has been deleted from the computer using uninstall and manual deletion.  Still same error message.
    Using the troubleshooting guide, I tried to delete Adobe 8.1 manually.  I tried to delete the files AcroIEHelper.dll, AcroPDF.dll and pdfshell.dll from my computer using command prompt, but computer says access denied.  When I try to remove them just by deleting them out of program files, computer says I do not have permission (although I am administrator).
    Any ideas???
    Thank You

    It means something else on your computer is working with your ipod. Make sure nothing else on your computer is open, and then open i-tunes only, and connect ipod to update.

  • HT3231 how to find file after using migration

    how to find files after migration has finished

    If you don't have any file you need in your old account, open System Preferences > Users and Groups and delete the old user. If not, I recommend you to migrate your files of your old account to the new one using Shared folder or an USB drive

  • Relocating music files after using migration assistant and time machine

    Hello
    I recently purchased an i7 MBP because my previous 15 in was stolen. Luckily I had a time machine backup of the old machine - my previous MBP was the Intel 2 Core Duo model just before the refresh to the i5/i7s
    So far what I did is ran migration assistant to bring my files over
    Everything seems to be fine, except when I got to iTunes much of my music is listed but I get the exclamation mark symbol next to most of the music and movies and apps
    I am trying to figure out how to fix this and relocate my files
    I know I could access my time machine backup by browsing other time machine disks, but I can't browse the music folder in a previous backup because I don't have the permisson to access it
    Any suggestions would be greatly appreciated!!

    Victor:
    If you correctly transferred your music files the problem is with your iTunes Library file.
    Open iTunes and quickly press the option key. A window will show to ask you to select the library file. Browse for it and it should fix the problem.

Maybe you are looking for

  • Problem in Releasing 46B IdocSegment in 640 SAPECC5.0

    Hi All, I have one Idoc segment which was created by some developer in 2005. This segment showing release 46B in WE31. Now SAP system is upgraded to ECC 5.0 and all the new created Idoc segments showing release 640 in WE31. But problem is that i have

  • How to add a time stamp to an array

     Currently the VI that I have attached has the capacity to log data from the set of 14 arrays. I currently have a tick counter hooked up. However, I would like to add a time stamp that will display the elapsed time in seconds from the begining of the

  • HT3819 Can I share I books with someone else?

    Can I share IBooks with anyone like you can on Amazon?

  • Installing 10.5 Server on Macbook pro 2.9.3 extern. HD Issues -booting loop

    Hey all, system: • macbook pro 2.93 • external firewire drive Objective: • installing 10.5 Server from dvd on external drive Issue: • macbook pro when trying to boot up from the 10.5 Server dvd is stuck in a reboot loop Additional info • this dvd was

  • Don't want downloaded photos opening at all

    I know how to change the default app to open downloaded files.  How do I NOT have them open at all?  I'm trying to download a whole gallery of photos and it keeps interrupting to open the files in preview.  I just want them saved to my downloads fold