Binary File Transfer

Hi Experts,
     i need to know how to transfer Binary files from application server to presentation server...
     does it have  any function module???
     i hav use this Function Module 'DX_FILE_COPY'...
      but it transfers only normal ".txt" files......
Thanks,
kassim

Hi,
I have searched the net and found something interesting that i think might solve your problem:
FM 'C13Z_APPL_TO_FRONT_END ' if present downloads binary files from the application server to the presentations server. It will show you a popup (which file to download and where to put it, including
the type of file) and when you click on the download button it will call function module C13Z_FILE_DOWNLOAD_BINARY, this will call (in the end) WS_DOWNLOAD.
FM 'C13Z_FILE_DOWNLOAD_BINARY' can show you how to write your own function, replacing WS_DOWNLOD with GUI_DOWNLOAD as WS_DOWNLOAD is obselete.
FM LIKE:
C13Z_FILE_DOWNLOAD_ASCII - Downloads a file in ASCII format
C13Z_FILE_DOWNLOAD_BINARY - Downloads a file in binary format
C13Z_FILE_UPLOAD_ASCII - Uploads a file in ASCII format
C13Z_FILE_UPLOAD_BINARY - Uploads a file in binary format \
I think above FM will definetly useful for you.
Pooja

Similar Messages

  • Binary file transfer using RMI

    Thanx in advance !!!
    My Query:
    Is there any restriction on the maximum size of a binary file that can be transferred over RMI?
    In an application (and as per the requirements), I am converting the file contents to a byte array on the client machine and transferring using RMI method calls. At the server side, I am reconstructing the file using the same byte array.
    Writing a Java FTP application is out of question.
    So please advise.
    Vikas

    RMI uses TCP/IP so the default should be close to the standard IP limit.

  • Problem with binary file transfer

    Hello everybody,
    I've got a bit of a strange problem. I'm making an application that opens a socket connection to a waiting perl script on the other side of the line. What it should do is recieve an int (filesize in bytes) and then a binary stream. This stream is written to a file, and I should have succesfully transfered a file.
    But the file I end up with isn't the same. The size is correct, and almost al the binary data seems to match up with the original, save a very few corruptions. The beginning and ending of the 2 files are exactly the same though.
    I know the Perl script is correct, I've stored the output through another script and had no problems.
    This is the code I used in Java:
    The Reader:
    in = new BufferedReader(new InputStreamReader(sock.getInputStream()));The important stuff:
    private void readBytes(int numberOfBytes) {
         FileOutputStream fos = null;
         try {
              fos = new FileOutputStream("image.jpg");
              DataOutputStream dos = new DataOutputStream(fos);
              for (int x = 0; x < numberOfBytes; x++) {
                   dos.writeByte(in.read());
         catch (IOException e) {
              System.out.println("IO Exception in readBytes");
    }I've got no idea how this could fail. Anybody who does? Thanks in advance.

    Thanks, the last two answers explained my problems. I've got it fixed now, this is the way I did it:
    private void readBytes(int numberOfBytes) {
         try {
              fileSock = new Socket(host,2001);
              fileIn = new BufferedInputStream(new DataInputStream(fileSock.getInputStream()));
              FileOutputStream fos = null;
              fos = new FileOutputStream("image.jpg");
              DataOutputStream dos = new DataOutputStream(fos);
              for (int x = 0; x < numberOfBytes; x++) {
                   dos.writeByte(fileIn.read());
              dos.close();
              fos.close();
              fileSock.close();
         catch (IOException e) {
              System.out.println("IO Exception in readBytes");
    } I'll assign the Duke Dollars, thanks again for helping out.

  • Simple PRC file transfer between devices or via PC not so simple, sigh.

    Greeting, this is my first post so excuse me if I make some faux pas.
    I was unpleasantly surprised how difficult, almost imposible it is to take a [custom] PRC off one Palm device and put it on a second, even using a Windows PC as the intermediary.
    The devices use Palm 4.1 OS and are bar code scanners, SPT1800, made by Symbol and now legacy devices since Motorola bought them out.
    So one PRC is a tiny program that allows the main program to be downloaded via a network. Without this tiny program, can't get the devices to do anything.
    I tried terminal programs and what not. I can talk to the devices via COM1 and even 9600 n81, a simple protocol. They do have some kind of binary file transfer capability. But I cannot even get a Directory listing, nothing from the Palm device. That file capability is simple not there. Really surprised me.
    Desktop software is useless so far, from Symbol/Motorola. Have not tried Palm's but it looks almost identical and only allows PRC to be transferred to the device for installation, not vice versa.
    I am trying to avoid installing linux and using pilot-xfer only because that takes a couple of days before I can download and debug everything. But Pilot can make a backup of the Palm device, purportedly, any Palm device just about.
    Any suggestions? Pilot-xfer is still not ready for Windows?
    I am using Windows XP Pro with the Com1 port. I did try Telnet and a Terminal program but I cannot get the Palm device to do much.
    I guess they did this on purpose so the files can't be messed up?
    Anyway to just make a backup of the regular memory, not the ROM?
    I have emailed a few Palm service companies if they can sell me a program to do this but I doubt they will. We did send some Palm devices out to one of these companies and it's almost 2 months now. It's murder.
    Thanks, AdamPalm
    Post relates to: None

     Your references are appreciated. I look forward to testing this out. It's interesting how complicated this gets and all the little deadly false steps. For example, I use 98se and XP Pro mostly [Win 2000 and linux sometimes]. I shut down the serial ports. No problem I thought. I just open them up when I need COM1 and that particular IRQ.
    BIG PROBLEM NOW. Machine can't work now with COM1 in 98se. That IRQ is not moving back. XP PRO does not have this problem since presumably lots of IRQs and not used that much.
    This complete collapse of the computer with something as dumb as enabling/disabling COM ports in the BIOS has me gobsmacked. It's so bad it's funny. Never saw this problem before in all the various operating systems. I better not see this again. I might really go over to linux as soon as I figure out how to play all those proprietary formats that don't play in linux.
    What should take minutes will probably take days to sort out all the problems.
    Do others encounter this too? Sorry to whine but that's fun too.
    Thanks for all the comments fellow. Appreciated.
    Post relates to: None

  • Transfer a binary file stored in a table field in oracle to another table different schema in oracle

    I would like to know if it is possible to use ssis to transfer a binary file of a datatype of long raw in a field in one table in oracle to a new table in a different schema of a datatype blob in oracle? The binary file is a Crystal reports executable
    which is used in a application that I support. I are trying to consolidate data fields over many schemas into one main schema to simplify the support issues.

    Hi r_peterser,
    SQL Server Integration Services maps DT_IMAGE data type to LONG RAW and BLOB in Oracle. So, you can directly use an OLE DB Source or Oracle Source adapter to extract the LONG RAW column from the Oracle database, and then load the data to the BLOB column
    of the Oracle table through an OLE DB Destination or Oracle Destination adapter.
    Reference:
    http://technet.microsoft.com/en-us/library/ms141036.aspx 
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • How to set the file transfer mode to binary

    Hi,
    I have a requirement to upload files from local machine to server, and it is working fine.
    But after uploading files junk characters are entered after each line, so want to set the file transfer mode to binary to get rid from this error.
    We have checked that if we ftp the files manually then also getting the same problem when the transfer mode is not selected as binary.
    Please give your valuable advice.
    Thanks,
    Ranita

    Hi,
    I want to set the file transfer mode through controller code, presently I am using the below code where no file transfer mode is specified ::
    public void upLoadFile(OAPageContext pageContext,OAWebBean webBean)
      String serverPath = null;
      OAApplicationModuleImpl am = (OAApplicationModuleImpl)pageContext.getApplicationModule(webBean);
       try {              
          Connection conn = am.getOADBTransaction().getJdbcConnection();     
          String query = "select  distinct variable_name, value from fnd_env_context where variable_name = 'XXCUST_TOP' and concurrent_process_id = ( select max(concurrent_process_id) from fnd_env_context )";
          PreparedStatement stmt = conn.prepareStatement(query);
           for (ResultSet resultset = stmt.executeQuery();
                          resultset.next(); )
                 serverPath  = resultset.getString("value");
            stmt.close();  
           catch(Exception ex)
             throw new OAException(ex.getMessage(), OAException.ERROR);
       String filePath = serverPath+"/"+pageContext.getParameter("FileType");
       //System.out.println("Default File Path---->"+filePath);
       String fileUrl = null;
       try
        DataObject fileUploadData =  pageContext.getNamedDataObject("MessageFileUpload");
      //FileUploading is my MessageFileUpload Bean Id
        if(fileUploadData!=null)
         String uFileName = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_NAME"); 
         String contentType = (String) fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");  
         //System.out.println("User File Name---->"+uFileName);
         FileOutputStream output = null;
         InputStream input = null;
         BlobDomain uploadedByteStream = (BlobDomain)fileUploadData.selectValue(null, uFileName);
         //System.out.println("uploadedByteStream---->"+uploadedByteStream);
         File file = new File(filePath, uFileName);   //C:\\Ranita
         //System.out.println("File output---->"+file);
         output = new FileOutputStream(file);
         //System.out.println("input---->"+input);
         byte abyte0[] = new byte[0x19000];
         int i;
         while((i = input.read(abyte0)) > 0)
         output.write(abyte0, 0, i);
         output.close();
         input.close();
         HashMap map = new HashMap();
         map.put("fromPage","Y");
         pageContext.forwardImmediatelyToCurrentPage(map,true,OAWebBeanConstants.ADD_BREAD_CRUMB_YES);
       catch(Exception ex)

  • How to transfer a binary file through the socket?

    hi,
    i have a problem when I want to transfer a binary file through the socket. On the server side we write a program with C. On the client side with use java. The socket worked fine when we transfer some asci files. But failed when transfer the binary file. How to solve the problem? Can someone give me some advice? Thanks a lot.
    sincerely,
    zheng chuanbo

    i use streams to read the binary file. The problem is I don't know when the transfered stream finished. With text file I can recognize the end of the transfer by a special string, but how to deal with the end of a stream? should the server send an "EOF" or something else to the client to notify the end?

  • The binary file processing in PDA device (LabVIEW PDA Module)

    To whom it may concern,
    I created a VI application, which should read some binary files and transform them to waveforms shown in the Waveform Graph. I implemented it with Mobile/PDA module. This application runs successfully on my desktop, that is, on the Labview Front Panel. However, when I run it on "Windows Mobile 5.0 Pocket PC Device" (a PDA has been already connected to the PC), all the windows, menus, buttons are displayed correctly, the only thing wrong is that the waveform can't be shown in the Waveform Graph. So, I wonder whether the Windows Mobile system will automatically modify the binary file format a little when I copy them from the PC to my PDA so that the original VI can't process it as what I expected in PC execution. Or, are there any requirements for the programs that will be executed in actual Windows Mobile Device?
    Thanks a lot for any comments and suggestion. 

    Thanks, Jeremy,
    I used LabVIEW 8.5.1.  I rechecked and debugged the VI. The problem is not due to the Waveform Graph. I set an indicator after the Read File unit, in both PC Front Panel and PDA Front Panel. As I described before, when I run it in the PC Front Panel, the indicator could show the right values read from the file. But when I switch to PDA Device Front Panel, the indicator shows zero (invalid values), which demonstrate that the data is not accessed from original files.
    The units I used are shown as follows:
    File Dialog ---> Open/Create/Replace File ---> Get File Size ---> Read From Binary File (Here I set an indicator, no values read from the file, but if run in PC, correct values will be shown).
    In this case, I guess the problem should come from the transfer (copy operation) of the file from PC to PDA. Or the operation behavior for LabVIEW  Read File unit is a little different for PDA implementation from its PC implementation.
    If you want more information, including the original binary file or VI, please let me know. Thanks a lot.

  • Can't decrypt binary file with PBE

    Hi,
    I'm writing an simple file transfer application using UDP that encrypts the data
    before sending it with PBEWithMD5AndDES. Text files are encrypted and
    decrypted fine, but binary files such as a JPG/EXE/DOC... are messed up
    and an application can't open them on the other side. Has anyone experienced
    such a problem?
    Thanks

    Below are my encrypt and decrypt functions.
    Thanks in advance.
            public  byte[] encrypt(byte[] data)
                 PBEKeySpec pbeKeySpec;
                 PBEParameterSpec pbeParamSpec;
                 SecretKeyFactory keyFac;
                 ByteArrayOutputStream b=null;
                 DataOutputStream d =null;
                 //      Salt
                 byte[] salt = {
                           (byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c,
                        (byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99
                 //      Iteration count
                 int count = 1000;
                 // Create PBE parameter set
                 pbeParamSpec = new PBEParameterSpec(salt, count);
                 try{
                      pbeKeySpec = new PBEKeySpec(sessionPassword.toCharArray());
                      keyFac = SecretKeyFactory.getInstance("PBEWithMD5AndDES","SunJCE");
                      SecretKey pbeKey = keyFac.generateSecret(pbeKeySpec);
                      // Create PBE Cipher
                      Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES","SunJCE");
                      // Initialize PBE Cipher with key and parameters
                      pbeCipher.init(Cipher.ENCRYPT_MODE, pbeKey, pbeParamSpec);
                      b = new ByteArrayOutputStream();
                      d = new DataOutputStream(b);
                      // create CipherOutputStream
                      CipherOutputStream out = new CipherOutputStream( b, pbeCipher );
                      // write contents to file and close
                      try {
                           for ( int i = 0; i < data.length; i++ )
                                out.write(data);
                             out.flush();
                        out.close();
                   // handle IOException
                   catch ( IOException exception ) {
                        exception.printStackTrace();
              catch(Exception e){}
              return(b.toByteArray());
         public byte[] decrypt(byte[] data)
              PBEKeySpec pbeKeySpec;
              PBEParameterSpec pbeParamSpec;
              SecretKeyFactory keyFac;
              byte[] decryptedData=null;
              //      Salt
              byte[] salt = {
                        (byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c,
                        (byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99
              //      Iteration count
              int count = 1000;
              // Create PBE parameter set
              pbeParamSpec = new PBEParameterSpec(salt, count);
              try{
                   pbeKeySpec = new PBEKeySpec(sessionPassword.toCharArray());
                   keyFac = SecretKeyFactory.getInstance("PBEWithMD5AndDES","SunJCE");
                   SecretKey pbeKey = keyFac.generateSecret(pbeKeySpec);
                   // Create PBE Cipher
                   Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES","SunJCE");
                   // Initialize PBE Cipher with key and parameters
                   pbeCipher.init(Cipher.DECRYPT_MODE, pbeKey, pbeParamSpec);
                   Vector fileBytes = new Vector();
                   ByteArrayInputStream b = new ByteArrayInputStream(data);
                   CipherInputStream in = new CipherInputStream( b, pbeCipher );
                   byte contents = ( byte ) in.read();
                   while ( contents != -1 )
                        fileBytes.add( new Byte( contents ) );
                        contents = ( byte ) in.read();
                   in.close();
                   decryptedData = new byte[ fileBytes.size() ];
                   for ( int i = 0; i < fileBytes.size(); i++ )
                        decryptedData[ i ] = (( Byte )fileBytes.elementAt( i )).byteValue();
              catch(Exception e){Gui.chatArea.append("exception:"+e+"\n");}
              return(decryptedData);

  • File Transfer Protocol

    Hi,
    For my project, am curretnly storing the files in local xi server directory.  We need to ask the client for a FTP server information.
    In order to achieve this, is it enough to ask just the file server name and port followed by user name and pwd.
    As i have seen some parameters in file communication channel like connect mode and transfer mode, do i need to check these things also.
    Just let me know the parameters i need to get it from the client to implement a file sender or receiver communical channel which is of FTP and not NFS.
    Regards,
    B.Anandh

    Hi,
    have u read the information provided in link.
    &#9679;      Connect Mode make it permanent.
    &#9675;       Permanent
    An existing connection to the FTP server is used permanently.
    The connection is reestablished automatically if it is lost on the server side.
    &#9675;       Per File Transfer
    A new connection to the FTP server is established for each file transfer.
    &#9679;      Transfer Mode
    Set the FTP connection transfer mode to Text or to Binary.
    Thnx
    Chirag

  • Simple IP to IP file transfer

    Is there any built in method to easily transfer a small (ASCII or Binary) file from one IP to another?

    There isn't a "one line of code" solution to this, but it is very easy to implement.
    Open a SocketInputStream on one host, open a SocketOutputStream on the other host, then pump bytes into the input stream, and read byets on the output stream... That's a pretty basic task.
    - K

  • Writing a binary file

    Hi,
    I have trouble when writing a binary file. Here is what I do:
    I have some VI's collecting various data for a fixed period of time. I put all the data into 1D arrays at a fixed frequency (they all have the same size). Once it is done I merge all the arrays into one 2D array and I write that to a binary file. If I wait about 10 seconds after writing the file and I repeat the whole thing, everything is fine and the timing is correct. If I wait for a shorter period of time (say a sec, and this is the maximum I can wait to have a usable application) then the timing is wrong in the first part of the loop (the time-critical data-acquisition one). Of course, if I don't write the file, everything is fine (I have to wait about 250 msec between two runs, but that's ok). Any advice ?
    I also tried several things like streaming the data to disk during the time-critical period and this works fine only if the file allready exists. If not I experience jitters again. I don't really want to stream the data in real time, but it could work if I can get rid of the jitters. Again, any advice ?
    I'm using LV7.1 and the real time module running on a PC (ETS).
    Another, sort of related, topic: I noticed that when using 2D arrays within time critical loops all the process are slowdown whereas if I use several 1D arrays everything is fine... Any idea why ?
    Thanks,
    Laurent

    Hello,
    File I/O transfer rates during streaming to disk depends on several factors: CPU speed and load, hard drive technology (IDA / Serial ATA / SCSI ...), quality of programming. High jitter is always due to bad programming. File I/O operations are not deterministic. So, file I/O VI's must not be called in the critical task. Data must be saved in the normal priority VI's in order to keep jitter as low as possible. This is the reason why an application in RT is based on RT FIFO to transfer data from the critical loop and the normal priority VI.
    You will find a lot of tutorials detailing the key concepts for RT programming at the link below:
    * Real-Time Module
    http://zone.ni.com/devzone/devzone.nsf/webcategories/C25F8C664230613A862567DF006ABB06
    Moreover, memory allocation in LabVIEW is implicit. You must use large set of data carefully because some function reallocate new buffers for their outputs instead of reusing the input buffers (like the function "build an array"). You will find an example of how we can decrease the memory use with array in LabVIEW in the tutorials linked above.
    If you need more specific advices, you can post a sample code that reproduce the behavior that you does not understand. I will try to look at this and give you my feedback.
    Sincerely.
    Matthieu Gourssies, NIF.

  • Streaming data from cRIO to a data file (binary file) on a network Network Drive on the same LAN

    Dear All 
    I hope my message finds you all well 
    My Question is :  is it possible to log my data from cRIO to a network drive and stream the data being captured to a binary file in this drive ? and do the conventional File IO functions ?
    I heard that DataSocket can do this , but it is mainly used between computers (this is what i understood so far about it)
    My network drive is a DLink ShareCenter : http://sharecenter.dlink.com/products/DNS-320
    I know that i can use the NI 9802 SD Card module , but it is out of my budget now to buy it 
    Please assist 
    Best Regards
    Eng. Mohammed Ashraf
    Certified LabVIEW Associated Developer
    InnoVision Systems Founder, RF Test Development Engineer
    www.ivsystems-eg.com

    Hi Mohammed,
    Are you trying to accomplish all this with or without the use of a host machine? If you're doing it with a host machine then the best bet would be to transfer data to the host using network published shared variables and then write to a file on the network from there. 
    If you're trying to do all this from the cRIO straight to the network drive with no intermediate host PC there are many things to consider. First off would be making sure there are no security protocols on the network drive that would prevent the cRIO from accessing it. Next you'd have to make sure there are no drivers required for the network drive as many drivers will not work on the Real-Time OS since most of these drivers are designed for a Windows system. If all this is taken care of then I'd say FTP is probably your best bet for getting files onto the network drive as long as you have an FTP server. 
    I'm unsure about if you would be able to stream to a binary file from a cRIO. I would need to know more about your application and what hardware you're using. Again I'd recommend you use a host PC and do the file I/O from there if possible. Can you tell us a bit more about your application and setup?
    Miles G.
    National Instruments
    Applications Engineer

  • Binary file attachment

    Hi All,
    Can Oracle B2B accept binary file attachments in message payload?

    Hi Raj,
    B2B can be used to transfer binary documents or binary attachments. For attachment, you need to use proper content type value. You may refer the supported values here -
    http://www.b2bgurus.com/2007/11/attachment-feature-in-rosettanet-using.html
    If it is required to receive docs as body of message, then for binary docs (pdf and jpeg), it may be done by enabling binary transfer at b2b -
    http://www.b2bgurus.com/2008/10/pgp-encrypted-file-transfer.html
    Let us know if you need any other info.
    Regards,
    Anuj

  • B2B sending binary files

    Dear All
    I am new in oracle B2B
    i need to develop SOA Application including BPEL Process to call B2B services
    to transfer file and insert the file content into data base
    my scenario is
    i have two trading partner  . host partner receive a binary file(xls,txt) from remote partner
    used custom document protocol 
    how do the configuration for b2b server
    and how develop soa application

    I do not quite understand why you want to use B2B for this. BPEL is capable of writing and reading files. I would recommend BPEL only and not the use of B2B.

Maybe you are looking for

  • If my macbook is version 10.4.11, what is the next operating system or version that I need to upgrade to?

    My macbook is version 10.4.11. I'm having a lot of issues with updating to the new itunes, and even connecting my iphone. I know it is time to ugrade my whole operating system, but i am unsure of which one I need to get. Is it snow leopard, lion, or

  • Exporting fireworks with button

    This may be a stupid question with a simple answer but bear with me. I have used Fireworks for many years but have not created a button rollover for a while and everything is different. I have Fireworks 7.0 (PC) I created a symbol for the button usin

  • Excel export gives csv file occasionally after multiple exports

    Hi experts!! I have the following problem. After several exports to excel from the web UI the file format turns to csv, even though the user runs MS office 2007. I found 2 notes describing  the issue but these are for other releases and cannot be imp

  • Not authorized for song purchase

    Hello all. Sorry if this question has already been posted, but I'm looking for some help with my iTunes. I downloaded a song like I normally from the iTunes store, but now I can't play it. I keep getting the Authorize This Computer error. Saying my c

  • Quarterly & Half yearly appraisal in objective settings and appraisals

    Hi, I've customized the Objective Settings and Appraisals, created a template with part appraisal & its working properly. In my company the appraisals take place every 6 months i.e twice a year. If I create an appraisal document for an employee with