File Operations to A Remote system

Hi,
Is it possible to transfer files from my server to a remote machine through the internet. Basically my server is a web service which will be running on a remote machine over the internet. I need to transfer the files received by this service to my system at my place. Can someone help me in this regard!!! I working using NetBeans and the Server is deployed on Apache Tomcat.
this is the code i used:
byte[] iresult = port.inputgraph(key);
DataOutputStream dos =new DataOutputStream(new BufferedOutputStream(new FileOutputStream("/root/Desktop/input.png")));
dos.write(iresult);
Thanks in Advance,

hi,
thanks for ur reply......
I did the same thing . but when i use the outputstream command it gets stored only in the server and not in the local machine.
this is the code i used:
byte[] iresult = port.inputgraph(key);
DataOutputStream dos =new DataOutputStream(new BufferedOutputStream(new FileOutputStream("/root/Desktop/input.png")));
dos.write(iresult);
Edited by: ram.west on Oct 20, 2008 9:01 AM

Similar Messages

  • How to get Remote Data from a file which is in remote system

    Hi everybody,
    I have developed four classes.
    FileInterface.java:-
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface FileInterface extends Remote {
    public byte[] downloadFile(String fileName) throws
    RemoteException;
    FileServer.java:-
    import java.io.*;
    import java.rmi.*;
    public class FileServer {
    public static void main(String argv[]) {
    if(System.getSecurityManager() == null) {
    System.setSecurityManager(new RMISecurityManager());
    try {
    FileInterface fi = new FileImpl("FileServer");
    Naming.rebind("//10.161.15.219/FileServer", fi);
    } catch(Exception e) {
    System.out.println("FileServer: "+e.getMessage());
    e.printStackTrace();
    FileImpl.java:-
    import java.io.*;
    import java.rmi.*;
    import java.rmi.server.UnicastRemoteObject;
    public class FileImpl extends UnicastRemoteObject
    implements FileInterface {
    private String name;
    public FileImpl(String s) throws RemoteException{
    super();
    name = s;
    public byte[] downloadFile(String fileName){
    try {
    File file = new File(fileName);
    byte buffer[] = new byte[(int)file.length()];
    BufferedInputStream input = new
    BufferedInputStream(new FileInputStream(fileName));
    input.read(buffer,0,buffer.length);
    input.close();
    return(buffer);
    } catch(Exception e){
    System.out.println("FileImpl: "+e.getMessage());
    e.printStackTrace();
    return(null);
    FileClient.java:-
    import java.io.*;
    import java.rmi.*;
    public class FileClient{
    public static void main(String argv[]) {
    try {
    String name = "//10.161.15.219/FileServer";
    System.out.println("1");
    FileInterface fi = (FileInterface) Naming.lookup(name);
    System.out.println("2");
    byte[] filedata = fi.downloadFile("//10.161.15.88/C/RMITEST/Test.txt");
    System.out.println("3");
    File file = new File("//10.161.15.219/T.txt");
    System.out.println("4");
    BufferedOutputStream output = new
    BufferedOutputStream(new FileOutputStream(file.getName()));
    output.write(filedata,0,filedata.length);
    output.flush();
    output.close();
    } catch(Exception e) {
    System.err.println("FileServer exception: "+ e.getMessage());
    e.printStackTrace();
    Now Iam trying to access text file which is in remote s/m.
    It is developing stub and skeleton classes,when i run it is coming for local
    If I want to access remotely the error is coming like this
    1
    2
    3
    FileServer exception: null4
    java.lang.NullPointerException
         at FileClient.main(FileClient.java:18)
    Can anybody help me please.

    Probably the easiest way in this case is to run the performance trace (System/Utilities/Performance trace). Start transaction MD04, put on the trace in another window, press enter to see the stock/requirements list, then stop the trace and list the results. Then you'll see which tables were accesses with which queries.

  • Display files/directories of a remote system (RIO) on a host machine (PC)

    Hello,
    Please assume that we are discussing software built on the standard "Labview FPGA Control on Compact RIO" sample project. The host is a standard PC running LV14 Fall edition, the remote system is an sbRIO-9636 having an SD card and a USB HDD attached. The objective is process control. The process being controlled is not relevant to the question.
    This question is about implementing the following functionality: the user operates a host machine running a Labview user interface vi (UI Main.vi) locally on the host machine. Part of this vi must offer the user a built in dialogue (some express vi or another) or custom dialogue (a bespoke vi displayed on demand). The dialogue must display the directories and files of the remote system which runs RT Main.vi and it must allow the user to select a single XML file on the remote system (which contains some generic configuration information). The name of the file will then be passed to the remote system and the remote system will act to open it and populate some configuration variables.
    I am sure that a widely used solution exists for this problem but I've not found the right words to type into my favourite search engine yet to produce the result. I propose the following:
    1) User clicks a "select config file" button on UI Main.vi
    2) The UI Main.vi event loop enqueues a message on the UI Main message queue based on the value change event caused by the button press
    3) The UI Main.vi message loop enqueues a separate message on to the "UI Command Stream" network stream
    4) The RT Main.vi, RT Loop - UI Commands.vi subvi receives the message from the stream and enqueues it on the RT Main.vi message queue
    5) The RT Main.vi message loop performs some functions to read the disk structures, directories and file names from the RT system
    6) The file and directory name data in (5) is converted to a variant and is passed along with a suitable message into the RT Writer network stream
    7) The UI Main.vi periodically reads the RT Writer network stream (it's in the "monitoring loop") and enqueues the received message (from 6) into the UI message queue
    8) The UI Main message queue populated the UI Main front panel with the data
    9) The user selects the directory and file they desire and clicks an "ok" button
    10) The ok button click causes the event loop of UI main to enqueue a message in UI Main.vi's message queue due to the value change on the ok button
    11) The UI Message loop enqueues a message on to the "UI Command Stream" network stream with the selected fully qualified file name of the selected file as the data (stored as variant)
    12) The RT Main.vi, RT Loop - UI Commands.vi subvi receives the message from the stream and enqueues it on the RT Main.vi message queue
    13) The RT Main.vi message loop opens the XML file and populated the appropriate variables with the configuration options therein.
    The user should be able to cancel the dialogue and avoid using a configuration file but I have not delt with that here.
    Now for the questions:
    1) Is this a logical approach?
    2) Are there any suggestions for a better way?
    3) Any links to some pre-written code that will allow me to impliment all or part of this with minimum effort (I'm thinking here of the dialogue box bit rather than the network streams and events bit as those structures are extant and have lots of bespoke code already in them)?
    Thanks,
    James
    Solved!
    Go to Solution.

    Hi Bob,
    Thanks for your input. You're right I have used network streams. 
    I implimented more or less what I said in my original post. It works. My main objective was to keep all the config stuff, and data for the particular target on the target's SDCard. On reflection that did make my life much harder than keeping stuff on the host. 
    It is more (quite a lot more) involved to keep the config files on the target and send directory info etc. back to the host on demand. If I was to do this again I would probably keep the config files on the host machine and keep them in Dropbox or a Google drive so that if I had more than one host to work from (Work PC, Home PC and Laptop...) I would have all my files with little effort. Still I didn't konw that when I started.
    Thanks,
    James

  • How to create a jar file which is in the remote system?

    Hi,
    I have a set of files that resides in a remote system,which have to be "jar"red. I have a firewall in between. I want to create a jar file out of the files situated in the remote system.How do i go about this process.?

    Hi,
    You can't do that in a simple way. You need to have a port open in the firewall, and you need to have a server process on the remote machine.
    Kaj

  • How to call an EXE file on a remote system from SAP system?

    Hi Friends,
    I want to execute an EXE file existing on the remote system from SAP system. Could some one give me an idea of how to execute that?
    Thanx in advance,
    Ram

    Hi Ram,
    Try this
    SXPG_COMMAND_EXECUTE
    Reward if this helps,
    Satish

  • Max crash under "Remote systems"

    Most of the time when MAX will crash when the mouse is clicked over the cRIO-9014 icon under remote systems.
    Is there a fix for this? MAX 4.5 and VISA 4.4 are the software installed in the targets. See jpg file for items under remote systems.
    Attachments:
    Max Crash.JPG ‏136 KB

    Anna,
    The mouse can be clicked to open all of the remote system objects but when the mouse is clicked over Ni-cRIO9014-013DBB8D, the Ni-cRIO9014-013DBB48 or the "Devices and Interfaces" icons MAX freezes (mouse icon becomes an hour glass). There are no warnings and after waiting for about 10 minutes I click the close button on the top right hand corner. See jpg message for the response.
    I've made a project with the cRIO 9014 and Ni9211 modules and it does work (can record tempeature). It seems to occur more often because I was able to get the URL for the project by clicking on the Ni-cRIO9014013DBB8D but now I'm not able to anymore.
    Hope this helps to better define the problem.
    Steve
    Attachments:
    Max Message aft crash.JPG ‏125 KB

  • File to RFC - error while processing message to remote system:com.sap.aii.

    Hi
    i m working on File to RFC scenario. the records are getting displayed in sender CC and receiver CC. But in receiver CC i m also getting the following error:
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: JCO.Exception while calling ZRFC in remote system (RfcClient[CC_RIS_STC_PIMASTER_RECEIVER]):com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE:      Screen output without connection to user.    
    Error in processing caused by: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: JCO.Exception while calling ZRFC in remote system (RfcClient[CC_RIS_STC_PIMASTER_RECEIVER]):com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE:      Screen output without connection to user.   
    It was working fine few hours earlier but showing this error now. i was giving a SUBMIT program , but stopped that now.
    But still facing the same problem. and in SXMB_MONI its showing recorded for Outbound processing.
    could anyone help.

    Hi
    I am Facing  Following Error When I am trying to call SAP Screen through JCO.jar
    com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Screen output without connection to user
    Please Guide Whethere it is possible to call SAP screen Through JCO.jar  ot NOT
    Please HELP if it is possible to Call SAP screen through JCO.jar with step and Code
    Thanks
    Vivek

  • Creating File System Repository for a remote system

    Hi Experts,
    My requirement is that I need to create a KM repository in EP from where I need to upload documents into the BW system. Is File System Repository the right type of repository which I need to create for this purpose?
    If yes, then in what format do I have to specify the value of the Root Directory property of the repository? I have a folder /data/docs created in the BW system within which I want to upload documents using this repository. But since this folder is located on the BW system which is a remote system for EP, I am not sure how I have to enter the path to this folder.
    Can anyone give me any hints on this?
    Warm Regards,
    Saurabh

    Hello Saurabh,
    I don't think an FS repository is what you are looking for in this scenario, you could instead use a BI Repository Manager, for more information see:
    http://help.sap.com/saphelp_nw70/helpdata/en/43/c1475079642ec5e10000000a11466f/frameset.htm
    Kind regards,
    Lorcan.

  • How to create the log file in remote system using log4j.

    Hi,
    How to create the log file in remote system using log4j. please give me a sample code or related links.The below example i used for create the log file in remote system but it return the below exception.Is there any authandication parameter for accessing the remote path? Please help.
    public class Logging
    Logger log=null;
    FileAppender fileapp=null;
    public Logging(String classname)
    try
    log = Logger.getLogger(classname);
    String path=" [\\192.168.0.14\\c$\\LOG\\d9\\May_08_2008_log.txt|file://\\192.168.0.14\\c$\\LOG\\d9\\May_08_2008_log.txt]";
    fileapp = new FileAppender(new PatternLayout("%r [%t] %-5p %c %x - %m%n"),path, true);
    log.addAppender(fileapp);
    log.info("Logger initilized");
    }catch(Exception ex)
    ex.printStackTrace();
    java.io.FileNotFoundException: \\192.168.0.14\c$\LOG\d9\May_08_2008_log.txt (The network path was not found)
    at java.io.FileOutputStream.openAppend(Native Method)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
    at org.apache.log4j.FileAppender.<init>(FileAppender.java:109)
    at annwyn.logger.BioCapLogger.<init>(Logging.java:23)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Please help.
    Thanks in advance.
    Saravanan.K

    Sorry path is missing for the above request.
    path="\\192.168.0.14\c$\LOG\d9\May_08_2008_log.txt ";
    please help.
    Saravanan.K

  • Unable to run a Batch File Operating System Command

    Using XI 3.0, I am unable to run a Batch File Operating System Command After Message Processing.
    My Batch file:
    gpg -se -r BOA3RSKY --armor --passphrase-fd 0 %1 < C:\Progra~1\GNU\GnuPG\gpgin
    My Command Line (ID scenario)
    exec "cmd.exe /c C:\Progra~1\GNU\GnuPG\boagpg.bat %F"
    If I execute
    exec "cmd.exe /c type C:\Progra~1\GNU\GnuPG\boagpg.bat >xis.txt"
    It displays the contents of boagpg.bat file in xis.txt.
    I just don't understand why when I run the batch file, I would expect an %F.asc encrypted file in the same directory as the %F unencrypted file.
    Any ideas?
    or will I need Basis to create commands that will allow me to run GPG from XI Command Line?

    Check this links if its helpful
    http://help.sap.com/saphelp_nw04/helpdata/en/bb/c7423347dc488097ab705f7185c88f/frameset.htm
    /people/sap.user72/blog/2004/01/30/command-line-help-utility
    Check this thread a similar problem
    Process Integration (PI) & SOA Middleware
    Note 841704 - XI File & JDBC Adapter: Operating system command
    http://service.sap.com/sap/support/notes/841704
    Try to see the below links
    /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching
    OS Command on FTP
    OS command line script - Need help
    FTP - Run OS Command before file processing
    Note: reward points if solution found helpfull
    Regards
    Chandrakanth.k

  • File- XI- RFC produces no output on remote system...

    My RFC call is not producing the output I expected.
    (scenario: file ->XI->remote RFC call)
    When I go into the debugger for the RFC and plug in the
    same values as in my text file, I get no error messages, and
    I get my desired output (creates a Purch Request on remote system).
    However, when set up to run from within XI, there is no output.
    Questions --
    1. Where on the remote system can I look for possible error msgs?
        ABAP dump analysis shows no entries for this RFC
        SM58 RFC log has no entries.
    2. SXMB_MONI on XI shows no error msgs.  Where else can I look?
        No dumps on XI either.

    >. Check if the RFC needs explicit commit, if so handle the same in the receiver RFC adapter.
       Commit is in the RFC.  It works, at least when run in debug mode on remote system.
    >2. Check if there is any conversion exit needs to be done for any field.
         I found some earlier problems with the input file, but fixed them.
         Plugging the same exact values into the debugger nets a result.
    >3. For testing purpose you can try with a sync call so that you will have the return parameter as response so you can debug easily.
          Haven't tried this one yet.
    >4. Did you check the Adapter /communication channel monitoring and is it succesful?
         Yes, the commx channel is working.  I know the RFC is being run, since I had previous
         errors that showed up in the remote systems dumps.  Fixed those problems, but now
         I get no feedback and no output.

  • Read and Write file in Remote system Drive

    Hi all,
    I am try to create the file in Remote system,
    in example i find the method to create file in remote system , ie //computer_name/Share_name/fileName
    the above sample , i know the computer name but i dont know Share name of the computer ,
    Its any possible to find the share name in java ?
    please give some idea to solve my problem ?
    With Regards,
    Ganesh Kumar.L

    tlgkumar wrote:
    in example i find the method to create file in remote system , ie //computer_name/Share_name/fileName
    the above sample , i know the computer name but i dont know Share name of the computer ,
    Its any possible to find the share name in java ?Sure. Ask the person who is writing the requirements which share you should use. Don't settle for incomplete requirements.

  • Creating file in remote system - Urgent

    Hi all
    We have a requirment like creating a file in remote sytem 'c:\' drive through abap program.
    Pls give valuable suggestion as soon as possible.

    HI babu
    Thanks for reply.
    I need to create a file in remote system not in local system.

  • Filestream Creation Unable to Open Physical File Operating System Error 259

    Hey Everybody,
    I have run out of options supporting a customer that is having an error when creating a database with a file stream.  The error displayed is unable to open physical file operating system error 259 (No more data is available).  We're using a pretty
    standard creation SQL script that we aren't having issues with other customers:
    -- We are going to create our data paths for the filestreams.  
    DECLARE @data_path nvarchar(256);
    SET @data_path = (SELECT SUBSTRING(physical_name, 1, CHARINDEX(N'master.mdf', LOWER(physical_name)) - 1)
                      FROM master.sys.master_files
                      WHERE database_id = 1 AND file_id = 1);
    -- At this point, we should be able to create our database.  
    EXECUTE ('CREATE DATABASE AllTables
    ON PRIMARY
        NAME = AllTables_data
        ,FILENAME = ''' + @data_path + 'AllTables_data.mdf''
        ,SIZE = 10MB
        ,FILEGROWTH = 15%
    FILEGROUP FileStreamAll CONTAINS FILESTREAM DEFAULT
        NAME = FSAllTables
        ,FILENAME = ''' + @data_path + 'AllTablesFS''
    LOG ON
        NAME = AllTables_log
        ,FILENAME = ''' + @data_path + 'AllTables_log.ldf''
        ,SIZE = 5MB
        ,FILEGROWTH = 5MB
    GO
    We are using SQL Server 2014 Express.  File streams were enabled on the installation SQL Server.  The instance was created successfully and we are able to connect to the database through SSMS. The user is using an encrypted Sophos. 
    We have tried the following:
    1. Increasing the permissions of the SQL Server server to have full access to the folders.
    2. Attempted a restore of a blank database and it failed.
    There doesn't seem to be any knowledge base articles on this particular error and I am not sure what else I can do to resolve this.  Thanks in advance for any help!

    Hi Ryan,
    1)SQL Server(any version) can't be installed on encrypted drives. Please see a similar scenario in the following link
    https://ask.sqlservercentral.com/questions/115761/filestream-and-encrypted-drives.html
    2)I don't think there is any problem with permissions on the folder, if the user can create a database in the same folder. Am not too sure. Also see the article by
    Jacob on configuring the FILESTREAM for SQL Server that describes how to configure FILESTREAM access level & creating a FILESTREAM enabled database
    Hope this helps,
    Thanks
    Bhanu 

  • Printing or exporting  files from remote system running SAP

    Hi to everyone,
    I am trying to print or save exported data from SAP (in Excel)to a remote system where I am working. SAP is running in a remote server to which I am connected. So far I have only been able to print and save in the remote system (where SAP is running ), but can't do it to my printer/PC. It is probably a simple problem but I can't see an answer.
    Thank very much to anyone who can give me a clue.
    Antonio

    check if printer LP02 or similar is defined on your SAP system. It prints via SAPLPD to your local printer.
    To save anything to your local PC - you can use "save to local file" from the report, or WS_DOWNLOAD FM from ABAP.

Maybe you are looking for

  • Key Mapping Enter to Tab

    Hi Java experts, In my application I need to map the Enter key on the number pad to the Tab key. I need this to happen EVERYWHERE on EVERY screen in the app. Basically I just want to do a field advance every time this key is pressed. I do have a comm

  • HP C309 G AIO can't install in Windows 7 64bit  running under BootCamp

    HP C309 G Printer wont install in Windows 7 64bit running under BootCamp on a new iMac Just bought a new iMac. Installed HP C309 all in one without incident on the Mac side. I am also running Windows 7 on iMac through a program called Bootcamp. When

  • Regarding Enhancements in ECC 6.0

    Hi,            This is Pavan. Can anyone explain in steps how to standard infotype in SAP ABAP-HR in ECC 6.0 Thanks in advance

  • How do I eliminate unwanted toolbars like Yahoo and AVG?

    Somehow I pressed some keys once and got both Yahoo and AVG toolbars on my computer. I want neither. I have tried to put AVG in the trash, but it is still there. I want to use straight Google for my searches.

  • Automatic transport configuration

    Hi all, i am new with the transport systems, and I need some help. I have the next scenario: A global development system: system: 1 development mandant 100 A global quality system: system: 1 quality mandant 100 And additionally I have 4 local develop