How to login to a remote (FTP??) server and read an XML file?

Hello all,
I would like some information on how to login to a remote server using a Java program.
The server might be a ftp server, because the client will ftp a xml file to this server, and the java program needs to login to this server and read the xml file, then convert it into a general report with headings and data from the xml file.
How can I quickly find the API information to login to a server and read an xml file?
If anyone knows the packages off the top of their heads, that would save me some time surfing.
If anyone can provide me some links, code examples, or information I'd greatly be thankful.
sharla

You can also just use plain java.net. It supports FTP. Example:URL u = new URL("ftp://user:passwd@server/path/to/file.xml");
InputStream in = u.openStream();
// do what you want ...

Similar Messages

  • How to retrieve characters like '£' from the database and write to xml file

    Hi ,
    I have a requirement to retrieve the data from database and write to files in XML format.
    I am able to do so successfuly by using XMLElement tag and writing to file through UTL_File package.
    All characters like <&@^ get converted properly, but when it comes to multibyte chars like '£', they are not able to get converted as it is.
    Can somebody please advise me how to go ahead.
    Regards

    Thanks odie.
    The nls_charset for my database is WE8ISO8859P1 and database version is Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi.
    The data (with pound sign) is sitting in one of the columns of the table and when i query it directly, I am able to view it properly.
    However when I use the below code to retrieve in XML format and print it to file, it gets changed. This file is also passed to one of the application GUI where this XML gets processsed and it is not visible properly.
    below id the sample abstract of code I am using.
    Declare
    l_file UTL_FILE.FILE_TYPE;
    l_clob CLOB;
    l_buffer VARCHAR2(32767);
    l_amount BINARY_INTEGER := 32767;
    l_pos INTEGER := 1;
    Begin
    SELECT XMLElement("case",
    XMLElement("comments",
    XMLElement("comment",
    XMLElement("comments",a.COMMENTS)
    ).getClobVal() val1 into l_clob
    FROM TO_COMMENTS a
    l_file :=
    UTL_FILE.fopen (XMLDIR,
    test.xml,
    'w',
    32767);
    LOOP
    DBMS_LOB.read (l_clob,
    l_amount,
    l_pos,
    l_buffer);
    UTL_FILE.put_line (l_file, l_buffer);
    l_pos := l_pos + l_amount;
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    DBMS_OUTPUT.NEW_LINE('Reached end of file');
    END;
    The comments column given contains the character like pound.
    And once the file is generated and i see using the vi editor, the char is not viewable properly like £
    And when the same is passed to GUI application to be processed, its not viewable propely in GUI from IE as well like �.

  • Rename and move files on remote FTP server

    Hello,
    We have a scenario where XI transfers a file to a remote FTP server at partner end using File Receiver Communication channel.
    These files are huge,so there is a risk of picking up incomplete files at their end when XI is still writing the file on their server.
    Hence,we have decided to follow the approach which is already mentioned a number of times on SDN that XI would place a file with different name and in a different folder on partner's FTP server.
    This would then be renamed and moved to the required folder on the same server.
    This could easily be managed using a script at partner end but there are some problems when they are not able to do this.
    Is there a possibility to achieve this using 'Run OS command after Message Processing' in XI when Source and target folders both are on partner's FTP server?
    If yes,can anybody please provide code for such a script and corresponding setting for this parameter in XI Communication channel?
    Thanks a lot in advance.
    Best Regards,
    Shweta

    Hello,
    Thanks for the reply.
    But this has to be done in FTP session because the source and target directory both are on remote FTP server.
    Instead,in SAP documentation,I found a parameter :
    ftp.putSafe=YES|NO
    Use this specification to define whether a transferred file is first created with a temporary name and only renamed once the transfer is complete (YES), or whether it is created with its final name at the start of the transfer (NO). The latter case can lead to problems if an application on the FTP server accesses the file before the transfer is complete. If you specify YES, this problem is avoided because the file only becomes visible with the search name when the transfer is complete.
    The default value is NO.
    Doesn't it serve the same purpose?Do we still need to write scripts?
    I have tried to include this in Additional Parameters in Advanced Mode as:
    ftp.putSafe  YES
    but I can't check in test system whether it is really working or not.I would like to confirm if it helps.
    First of all,I would like to know if this setting works for XI3.0 SP17.
    Can anyone please help.
    Thanks.
    Regards,
    Shweta

  • WCF Service and Sharepoint Form library : How i can read a access a form libray and query a item from file name and read form xml in WCF service ?

    WCF Service and Sharepoint Form library : How i can read or access a form libray and query a item from file name and read form xml in WCF service ?
    Ahsan Ranjha

    Hi,
    In SharePoint 2013, we can take use of REST API or Client Object Model to access the SharePoint objects like Form Library.
    SharePoint 2013 REST API
    http://msdn.microsoft.com/en-us/library/office/dn450841(v=office.15).aspx
    http://blogs.technet.com/b/fromthefield/archive/2013/09/05/working-with-sharepoint-list-data-odata-rest-and-javascript.aspx
    SharePoint 2013 Client Object Model
    http://msdn.microsoft.com/en-us/library/office/fp179912(v=office.15).aspx
    http://msdn.microsoft.com/en-us/library/office/jj193041(v=office.15).aspx
    With the retrieved file, we can then use XmlDocument object to parse it and get the values you want:
    http://weblogs.asp.net/jimjackson/opening-and-reading-an-xml-file-in-a-document-library
    http://stackoverflow.com/questions/1968809/programatically-edit-infopath-form-fields
    Best regards
    Patrick Liang
    TechNet Community Support

  • Unable to connect to the remote ftp server using dreamweaver.

    For the last one week I have been trying to connect to the remote ftp server using dreamweaver. I spoke to the technical support agency who manage our remote server but they are saying that there is no problem with the server adn they dont know anythign about dreamweaver so cant assist me.
    I was suggested to check with adobe team directly and i spoke to a technical support person on the live chat but they said since the version is CS4 - education version, they cant assist me at all!! This is just ridiculous...I am constantly being sent from one place to the other without anything getting resolved!!
    Please help somebody!!

    I am having a similar problem... maybe.  I was connected to my remote site all day yesterday, then out of the blue I tried to "put" an edited file... as I had been doing all day, and I received an FTP error:  Cannot make connection to host. Your login or password is incorrect.  That's odd, I've been connecting all day.  So I went into my sites > manage sites and clicked the Test button on my remote server information and it returned Adboe Dreamweaver CS connected to your webserver successfully.  I went back to my file and tried once more to "put" it on the remote server... again FTP Error: cannot make connect to host...  So I reboot my computer and start Dreamweaver CS3 again.  I reenter my remoter server information and click the Test button.  "... connect to your webserver successfully".  I try to put any file, FTP error again.  So I call my server administrator, he checks the servers logs and says there are no errors and you've connected successfully several times today.  I went through the trouble shooting steps listed here, though my FTP Logs are empty.  I cannot stay connected or even see the remote folders to try to drag and drop.  I tried to run ftp from a windows command prompt and it seems to connect me.
    I downloaded an installed an SFTP client and was able to successfully connect to my remote server and upload the files.  It's definately a Dreamweaver problem.  Any suggestions?

  • Regarding receiver FILE adapter,  REMOTE FTP server

    Hi All,
    The scenario was to get XML file from a local FTP server and to place that XML file in REMOTE FTP server, which we dont have any control over that REMOTE FTP,
    While executing the scenario it is successfully picked the file and processed and it was success in SXMB_MONI, but when we see the Communication Chaneel of the receiver adapter it is generating the following error..
    Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: ConnectException: Connection timed out: connect
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: ConnectException: Connection timed out: connect
    clarifications needed ASAP
    regards,
    Kishore.

    Hi,
    Verify the Host details of the Remote FTP.
    Try to ping the Remote host as below
    Goto > start>Run --->type cmd and give the command as below
    c:\>ping <host details or IP address> press enter and see if you get the successful communication response.
    If its not it indicates that the connection is not setup.
    Ask you FTP administrators to look into connectivity issue for it.
    Thanks
    Swarup

  • How to export an eloqua report to a (ftp) server and schedule this export

    I would like to export an eloqua report to a (ftp) server and schedule this export. I want to pick this report up by another tool like Qlikview.
    Liesbeth

    if it is something to do with having report admin rights is there a way to still export report data without these admin rights? is it possible to just export report data as activity data in the normal import/export section within the setup menu? is there a problem using filezilla client and oracle eloqua together for this?

  • I cant upload through muse's uploaed to ftp host. And it is so slow! I have the correct password, ftp server, and user name frustrating!!

    I cant upload through muse's uploaed to ftp host. And it is so slow! I have the correct password, ftp server, and user name frustrating!!

    What version of Muse are you using? If it's not 2014.2, please go to the Creative Cloud Desktop App or creative.adobe.com and update.
    The FTP login failure is most likely due to your host not supporting FTP Extended Passive Mode. In Muse 2014.2 switch to "Passive (PASV)" in the Connect to FTP Server dialog.
    Regarding performance, how large is your site (in pages and megabytes)? How many Design view tabs are open? What specific operations are slow?
    If you'd like to send your .muse file, I'll take a look and attempt to isolate the cause of slow performance. Please send me the .muse file at [email protected] along with a link to this thread. If the file is larger than 20Mb you can use a service like Adobe SendNow, Dropbox, WeTransfer, etc. Thanks.

  • Problem with passive mode FTP server and NAT

    Hi,
    I have a problem with Passive mode FTP and NAT.
    I am trying to run both an FTP server and sharing the Internet connection via NAT. I have by the way specified the passive ports to use in ftpaccess (65000-65534). Everything works fine until someone tries to connect via Passive mode. I have tracked the problem down to the firewall and the rule that handles NAT.
    Firewall rule config without NAT:
    00001 allow udp from any 626 to any dst-port 626
    01000 allow ip from any to any via lo0
    12300 allow ip from any to any
    65535 allow ip from any to any
    Firewall rule config with NAT
    00001 allow udp from any 626 to any dst-port 626
    00010 divert 8668 ip from any to any via en1
    01000 allow ip from any to any via lo0
    12300 allow ip from any to any
    65535 allow ip from any to any
    So, passive ports do not work when NAT is on. If I turn it off, Passive ftp works like a charm.
    But how do I solve my problem? I have in my quest for the answer stumbled upon "-punch_fw" but do not know how to use it or if it even helps me at all?
    Best regards,
    Peter
    B&W G3 Mac OS X (10.4.5)

    Media/Lacrosse-1-tiny.3gp
    I can't find the file on your server.
    They may also need to edit the .htaccess file to allow the .3gp file extension be used. Call them.

  • Install a FTP Server and GUI on Solaris 2.5.1.

    Hi All.
    I have two questions.
    1. What i have to do to install a FTP server on the installed Solaris 2.5.1 ?
    2. How can i install GUI on the same system ?
    I've installed Solaris on the Sparc Station, but, by default, the GUI was not installed
    on it.
    And now, when i turn on the power, i see only the command promt on the screen.
    How can i fix this "bug":-)
    Help me if you can.
    Thanks.

    1) The Sun provided FTP server should already be installed on the system unless the machine has been installed using a minimal install cluster. You might consider using something like ProFTPd. This is a VERY configuration FTP server and is a much better FTP server then the FTPd that comes with Solaris 2.5.1. See http://www.proftpd.org for more info.
    2) This is isn't a bug its actually a requirement for most people for servers in production or even development environments. The X "GUI" chews up a not insignificant amount of memory and proposes a security risk. To reactivate the GUI for startup at boot time, run this as root:
    /usr/dt/bin/dtconfig -e
    This of course assumes all the expected CDE/OpenWindows packages are available on the system. I haven't used CDE in years but I think you need to reboot the system to get CDE to startup correctly and grab the console. Not sure if starting it up while you are logged into the console will work.
    P.S. CDE is a PPPIIIGGGG. Run something respectible like Fluxbox or Blackbox. Heck, Gnome and KDE are pigs too but they are still better then CDE - twm is better then CDE LOL :)
    3) You said "I've installed ..." - I assume this means recently. You might consider upgrading to a more recent release of Solaris. Solaris 2.5.1 is rather "out of date" - this is not troll bait folks.

  • Pick the  file from FTP Server and place it on the App. Server of R/3

    Hi Guys,
      I had a requirement where i need to pick the file from the FTP Server and place it on the Application Server in R/3. If anybody has an Idea on acheiving this or if anybody has the piece of Code Snippet to acheive the same, Help me out.
    Regards,
    Kittu Chowdary.

    hi kittu,
    chk the demo programs RSFTP00* if they can help u

  • How do I set up a mail server and SMTP server to send messages to other mail servers at mavericks

    How do I set up a mail server and SMTP server to send messages to other mail servers at mavericks

    You need to get the settings for your email from your email provider and enter them in Internet Accounts (System Preferences). Many of the common systems are already available, all you need is a password and an email address to set them up.

  • Just published a new site to an FTP server and I got a 404 error message saying the site doesn't exist. When I retype the name of the site, I get a page from my hosting service saying this is the future home of [my site]. Any ideas?

    Just published a new site to an FTP server and I got a 404 error message saying the site doesn't exist. When I retype the name of the site, I get a page from my hosting service saying this is the future home of [my site]. Any ideas?

    Hi roddy,
    thanks for responding. I read your link, looked at my settings and they were all correct. I tried to do a republish and got this message: The requested URL /childrenandcaring/index.html was not found on this server.
    When I type the address in the address bar, I go to the site and the page says: This is the new site childrenandcaring.com
    Any other ideas?
    Suzanne

  • My fonts are changing in iWed after I publish. I need step by step instructions on how to go to my third party server and clear out all of my files and reload my whole website, the solution I saw posted by another. Please someone help me on this. Urgent

    My fonts are changing in iWed after I publish. I need step by step instructions on how to go to my third party server and clear out all of my files and reload my whole website, the solution I saw posted by another. Please someone help me on this. Urgent

    If your fonts are changing when viewed on other computers - epecially those running windows - you need to look at using web-safe fonts...
    http://www.iwebformusicians.com/iWeb/Fonts-Colors.html
    Also make sure you clear your browser cache before viewing you published files.

  • How to read an xml file on the server?

    Hi all,
    we need to read an XML file which will be on the appplication server (visible using the transaction AL11).
    We will use the transaction CG3Z in order to upload the file to the server.
    When we try to open it using the instruction OPEN DATASET we have a dump. Which way must we use to open an xml file in this case?
    Thanks for your help.
    David

    Hi
    With open dataset you can open any file on the application server. So it should be working, but maybe you are looking for:
    CALL TRANSFORMATION my_transformation
           SOURCE  XML xml_string
           RESULT  ROOT1 = field1
                   ROOT2 = field2.
    Best regards,
    Guido Koopmann

Maybe you are looking for