Exemple #1
0
        ////This doesn't work
        //private void cmdKeys_Click(object sender, EventArgs e)
        //   {
        //       updateTransfer("F62120000006");

        //    //const int KeyTypeSSH = 1;
        //    //if (token == null)
        //    //{
        //    //    admin.Url = "https://*****:*****@"c:\tools\fxadmin -updatetransfer " + fileId;
                admin.updateTransfer(oldTransfer, fileId, token);
                this.lblStatus.Text = "Transfer was added [" + fileId + "]";
            }
            catch (Exception ex)
            {
                MessageBox.Show("Exception: " + ex.Message);
            }
        }
Exemple #2
0
        public void addInternetDownload()
        {
            w2008cc.DateTime availDate = new w2008cc.DateTime();
            availDate.year  = DateTime.Now.Year;
            availDate.month = DateTime.Now.Month - 1;
            availDate.day   = DateTime.Now.Day - 1;

            w2008cc.Transfer xfer = new w2008cc.Transfer();
            xfer.availableDate       = availDate;
            xfer.clientFileName      = "C:\\tmp\\localfile.txt";
            xfer.serverFileName      = @"C:\Users\Public\FileXpress\Outgoing Customers\";
            xfer.directoryTransfer   = "1"; // 0 = no 1 = yes
            xfer.description         = "SOAP Added Download";
            xfer.authUserId          = this.txtUser.Text;
            xfer.nodeName            = "w2008cc_PS";
            xfer.sendRecvFlag        = "R"; // S = upload R = download
            xfer.allowableProtocol   = "SECURE";
            xfer.conversionFlag      = "0"; // 0 = Ascii to EBCDIC conversion 1 = ASCII to EBCDIC conversion based on local translation table
            xfer.notifyFlag          = "1"; // 0 = No. 1 = send notify email.
            xfer.notifyEmailTemplate = "email-notification-template-SOAP.xml";
            xfer.defaultNodeUserId   = "administrator";
            xfer.defaultNodePwd      = "password";
            xfer.defaultNTDomain     = "w2008cc";
            xfer.writeMode           = "Z";
            xfer.FTPAlias            = "/SOAPdownload";


            try
            {
                String fileId = admin.addTransfer(xfer, token);
                xfer.notifyFlag      = "0"; // 0 = No. 1 = send notify email.
                xfer.postActionFlag1 = "SR";
                xfer.postActionType1 = "COMMAND";
                xfer.postActionFlag2 = "SR";
                xfer.postActionType2 = "COMMAND";
                xfer.postActionData2 = @"c:\tools\fxadmin -removeuser " + txtUser.Text;
                xfer.postActionData1 = @"c:\tools\fxadmin -removetransfer " + fileId;
                admin.updateTransfer(xfer, fileId, token);
                this.lblStatus.Text = "Transfer was added [" + fileId + "]";
            }
            catch (Exception ex)
            {
                MessageBox.Show("Exception: " + ex.Message);
            }
        }