• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
ftp nsdata?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ftp nsdata?


  • Subject: ftp nsdata?
  • From: James Cicenia <email@hidden>
  • Date: Tue, 15 Mar 2011 21:20:58 -0500

Hello -

I am using the apache commons for ftp... looks simple.

excelData() returns NSData

I do this:

    public NXComponent ftpReportConfig()
    {
    FTPClient client = new FTPClient();
        try {
            client.connect(((Session)session()).company().ftpURL());
            if(client.login(((Session)session()).company().ftpAccountName(), ((Session)session()).company().ftpPassword())){
                String filename = "Export-"+(new NSTimestamp())+".xls";
                client.storeFile(filename, excelData().stream());
                client.logout();
            }else{
            errorText = "Bad authentication";
            return null;
            }


        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                client.disconnect();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return null;
    }

but I get nothing. No errors, and no file?

Anything obvious?

Thanks
James
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: ftp nsdata?
      • From: Ramsey Gurley <email@hidden>
  • Prev by Date: Re: Can't launch from JavaMonitor
  • Next by Date: Re: ftp nsdata?
  • Previous by thread: [MEETING] WO-NoVA POSTPONED TO NEXT WEEK - 3/22/2011
  • Next by thread: Re: ftp nsdata?
  • Index(es):
    • Date
    • Thread