How to send multiple files in parallel using ftp with single connection
Hi.
i have written code for file upload manager using ftp..
it perfectly working with sequence file uploading in single connection..
And i tried to upload multiple files with parallel processing in a single connection.... but it is not working properly.. i also used thread concept
but single file only transfered and connection refused...
my code here...
//////////////////// main class //////////////////////////////////////////
ftp.connect();
ftp.login();
String [] archivos = new String[100];
File dir = new File("C:\\Files Uploading\\");
archivos = dir.list();
for (int s=0; s<archivos.length;s++)
//Start Data Transfer Here
new DataTransfer(archivos[s]).start();
Thread.sleep(1000);
/////////////////////// thread class ////////////////////////////////
class DataTransfer extends Thread
String FileName="";
String LocalPath="",RemotePath="";
public DataTransfer(String fname)
FileName = fname;
LocalPath = "C:\\Files Uploading\\" + FileName;
RemotePath = FileName;
System.out.println(LocalPath);
public void run()
System.out.println("DataTransfer Started");
/File Transfer Here
try
FileInputStream input = new FileInputStream(LocalPath);
Ftp_Client.storeFile(RemotePath,input);
System.out.println("Successfully sent : " + RemotePath);
catch (Exception exc)
System.out.println(exc.getMessage());
System.out.println("DataTransfer Ended");
}otherwise tell me any other alternate way
And i tried to upload multiple files with
parallel processing in a single connection....
but it is not working properly.FTP isn't a multiplexing protocol. How could it work at all?
Similar Messages
-
How to send multiple files by using File Adapter
Hi Experts,
I am trying with the scenario by using the File Adapter.
As per my requirement, I need to send multiple files (like FileA.xml, FileB.pdf, FileC.txt, FileD.html etc) to the Target system.
I have seen Additional Files option, in Sender Communication channel. But I am not sure how to give the parameters, in case if I would like to send the multiple files as mentioned above.
Could someone please explain about the steps, that I need to proceed further?
Thanks in advance.
SreeAnand,
Thank you for your reply.
My requirement is to send the multiple files like inone.xml, intwo.txt etc. In the Sender Communication channel, I had provided ' inone.xml ' in the File Name field under the "File System Access Parameters" section.
Next I had chosen "Additional Files" option as Checked and provided ' intwo.txt ' in the field name of "File List".
After activation, i have provided those two files (inone.xml, intwo.txt) in the Source folder. It is not processing? What could be the problem ?
Thanks
Sree -
How to upload multiple files in Webdynpro using File upload Screen Element
Hi Experts,
Can anybody tell me how to upload multiple files/pdfs in webdynpro using file upload screen element, and also please tell me what is the maximum storage limit of RAWSTRING data type,Advance Thanks.
Regards,
SandeshHi Sandesh,
this is simply not supported, not in WebDynpro nor in standard HTML.
A workaround is to upload a ZIP with all files and on server side unpack the ZIP and operate on the single files.
I hope it will help u..
----------------------OR-------------------------
As you know using File upload UI element we can upload only one file at a time. There may be a scenario where user may want to upload any no of files at a time which is not determined at design time. This can be acheived using the ACF UpDownload UI element which requires a security whiltelist to be created
http://scn.sap.com/docs/DOC-2270
----------------------OR-------------------------
You can use Table UI element.
Regards,
Deepak Singh -
How to send multiple files with it's original name over HTTPS using one CC?
I am working on a File to HTTPs scenario. It is in production and working fine. Currently we send only one file and I have hard coded the name in the communication channel in the header fields. Now we have to send more files with different names and I want to use only one receiver channel instead of many. We need to send the files with their original names.
I used the ASMA in the sender File Adapter and I see the FileName in the dynamic configuration under http://sap.com/xi/XI/System/File name="FileName".
I know we can use a UDF in message mapping and get the value and put it in HEADERFIELDONE. But we don't want to use mapping as the files are huge and we don't want to insert XML tags in the payload.
So how do I put the Filename from the DynamicConfiguration to the HTTP header field as FileName without using mapping? Are there any settings?
Can I put something in the PROLOG or can I use any other module in the File Sender Adapter or is there any other option?
Any help is appreciated.
Thanks
SaiSee my blog:
/people/stefan.grube/blog/2009/06/19/unknown-use-case-of-dynamicconfigurationbean-store-file-name-to-jms-header-without-mapping
You have to put the configuration in sender channel, as HTTP adapter does not allow modules.
For the second module, put values related to HTTP adapter. -
How to send XML file into XI using sender HTTP adapter
I am using HTTP sender adapter to post the XML file into XI. I tried to form the URL by using the following String query , but I am unable to execute file.
String urlString = "http://<servername:portno>/sap/xi/adapter_plain?namespace=<namespace>&interface=<interface name>&service=<service name>&party=&agency=&scheme=&QOS=BE&sap-user=xiappluser&sap-password=satyam&sap-client=100&sap-language=EN";
How can I execute xml file by using HTTP sender adapter.
Any one with better suggestions, about this idea?
Thanks in advance for all.
Ram RajHi
Just use the following parameter to send xml file using HTTP adapter.
"http://xiserver:8000/sap/xi/adapter_plain?namespace="senderNamespace"&interface=senderinterface&service=sender service";
"&party=sender party"&agency=&scheme=&QOS=BE&sap-user=userid &sap-password=password&sap-client=100&sap-language=D";
with the help of this you are able to point out which interface you would like to use.
And in payload pass the xml.
and thats it
carry on
Cheers
Regards
Piyush -
Re: OSB - How to put multiple files via a osb ftp business service?
I have been trying to create an ftp business service to transfer files to a remote machine. I select that the service should support any XML document (since I am only sending XML). Then, I specify the remote server directory like so:
ftp://hostname:port/directory
I take the rest of the default settings. However, when I use the business ftp service by testing it in the console, it just hangs. I can successfully ftp to the server and send files from the OSB server command line to the remote server in question. So, it isn't a problem with our network or a misconfiguration of ftp. Has anyone successfully used the ftp business service in OSB? If so, how do I configure it properly? Thanks muchHave you checked server logs? Enable message tracing in operational settings and check the logs to find out where it is getting stuck.
Regards,
Anuj -
How to Upload Multiple Files from a folder at a single go?
Hi friends,
My requriment is to Upload many txt or excel files in a single shot.
If its a single file i can upload through Ws_upload or Gui_upload.
in the same way is there any function modules to upload many files at a time.
Regards
Venkatesh.SHi Venkatesh,
Try this code..
data: l_filename type string OCCURS 0 WITH HEADER LINE.
l_filename = 'c:\temp1.xls'.
APPEND L_FILENAME
l_filename = 'c:\temp2.xls'.
APPEND L_FILENAME
LOOP AT L_FILENAME
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = l_filename
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = '#'
TABLES
DATA_TAB = itab1.
OPEN DATASET <applicationfilename> FOR OUTPUT IN TEXT MODE.
IF sy-subrc = 0.
LOOP AT ITAB1
TRANSFER ITAB1 TO pt_infil .
ENDLOOP.
ENDIF.
CLOSE DATASET pt_infil.
ENDLOOP.
OR
use CL_GUI_FRONTEND_SERVICES->DIRECTORY_LIST_FILES
Regards,
Goutham. -
How to pass multiple parameters to Query using START WITH, CONNECT BY OBIEE
Hi
I have following oracle query which need to be used as a Data Source in OBIEE Physical Layer. I guess I have to create stored proc. How do I implement this in OBIEE RPD and how do I implement the respective Dashboard prompts for the parameters.
SELECT
CIRC.PATH_NAME, CIRC.BANDWIDTH , CIRC.CATEGORY, CIRC.CUSTOMER_ID,
CIRC.STATUS, CIRC.CUSTOMER_NAME,
QUER.LEV
FROM
CIRCUIT_PATH circ, VAL_CUSTOMER cust,
( SELECT
DISTINCT CIRC_PATH_INST_ID, LEVEL LEV
FROM
CIRC_PATH_ELEMENT
START WITH
CIRC_PATH_ELEMENT.CIRC_PATH_INST_ID IN ( SELECT
DISTINCT CIRC_PATH_INST_ID
FROM
PORTS a
WHERE SITE_NAME = @variable('Enter a Site Name')
AND CARD_SLOT = @variable('Enter a Card Slot')
CONNECT BY
PRIOR CIRC_PATH_ELEMENT.CIRC_PATH_INST_ID =
CIRC_PATH_ELEMENT.PATH_INST_ID
AND ELEMENT_TYPE != 'K' ) QUER
WHERE
circ.circ_path_inst_id = QUER.CIRC_PATH_INST_ID
and circ.cust_inst_id = cust.cust_inst_id (+)
ORDER BY
LEV DESC , CIRC.PATH_NAME ASC, CIRC.BANDWIDTH ASC
Thanks
DGHi John
Thanks. I looked at your URL. I do have package. Just using procedure. So my initialization string (For stored proc in Physical Layer of RPD) is
exec demo.add_employee(VALUEOF(NQ_SESSION.empid1));
But when I run request in Answer I get the error
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 900, message: ORA-00900: invalid SQL statement at OCI call OCIStmtExecute: exec demo.add_employee(105); . [nQSError: 17011] SQL statement execution failed. (HY000)
What should I put in initialization string in RPD?
Thanks
DG -
How to send multiple customer statements by email using RFKORD11
Hi All,
How to send multiple customer statements by email using RFKORD11 program.
As of now we copied the stanadard program and sending the customer statements by email, one by one.
if i execute the z program it will show the customer statement and send mail option.
if i click send mail it will send that customer statement to the corresponding customer.
then again i need to click back, it will show next customer statement and click on send mail.
Pl guide me, if any one worked on this program.
Regards,
MaheshHi .
You first need to copy that program to Z and make the changes in it. Can you convert sapscript to smartform?
then you can write a logic to send mail in the loop.
to send the pdf file
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/mailsendthroughoutputcontrols
Regards,
Madhuri
Edited by: madhuri sonawane on Jun 10, 2009 4:20 PM -
Send multiple files in different directories using Receiver File Adapter
Hi Experts,
I have one File to File without ESR scenario where I have to pick multiple files from different directories and to save them in different directories on receiver side.
Can anyne help me to send multiple files in different directories using receiver file adapter.
Is it possible??
Any help will be appreciated.
Regards,
Danishhi ,
that is possiable without esr,
we need to create one sender communication channel , in that we nend to use "adavnced selection for source file " for sending multiple files from multiple directories.
we need to create 'n' receiver communication channels and 'n' receiver agreements based on communication channels .
in receiver determination, provide multiple receivers
In interface determination , provide * symbol for receiver communication components
thanks, -
How to upload multiple files using wicket
Hai,
how to upload multiple files using wicket at a single browse.
any suggestion?
Thanks in advanceYou have to do this your self by either (as vinod said) using a different component (not present in adf) or implementing this:
1) allow the user to select multiple filenames (somehow)
2) zip them together
3) upload the zip
4) unpack the zip on the server
5) work with the files
Timo -
How to send multiple customer statements by email using RFKORD11 program.
Hi All,
How to send multiple customer statements by email using RFKORD11 program. Is it possible?
As of now we copied the stanadard program and sending the customer statements by email, one by one.
if i execute the z program it will show the customer statement and send mail option.
if i click send mail it will send that customer statement to the corresponding customer.
then again i need to click back, it will show next customer statement and click on send mail.
Pl guide me, if any one worked on this program.
thanks in advance.
Regards,
MaheshTry execute the program in the background to see if that helps.
-
How to send a file as an attachment using mailx
Hi
Can any one tel me how to send a file as an attachment using mailx command in shell script.
Thanks,
Suman.Wrong forum where to ask such questions.
Check this one link:
http://www.unix.com/shell-programming-scripting/18370-sending-email-text-attachment-using-mailx.html?t=18370#post70254 -
How to send XML file to https server using POST
Hi, I am having an requirement, that I have to connect to https server and I have to pass an input XML file as a response server will give me output XML file.
The certificate validation part is over, I am using FileInputStream to read the XML file and attaching this to connection.getOutputStream(); but server is throwing me DTD does n't match.
Can any body tell me how to send XML file, I have to use any DOM parser to send the XML file, suggest me and give me sample code.
Thanks,Can anybody give me the solution
-
how to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 device using ftp through Ethernet
Hello
For using FTP function in LabVIEW, I recommend you to check this document: FTP Basics
Also, take a look at FTP Browser.vi, which is available at the Example Finder.
To edit a XML file, try to use VIs in XML palette. Maybe Write to XML.vi helps you.
Post your current VI if possible.
Regards
Mondoni
Maybe you are looking for
-
Problems in selecting an image and scaling it.Image is selected using JFile
Hello All, I need to select a file using JFilechooser and scale it down and display it on the frame. This never happens.I dont know why.Please help me with this. Thanks. Regards. NP package loadpic; * <p>Title: </p> * <p>Description: </p> * <p>Copyri
-
My in-laws are moving from the eastern part of Virginia up to the northern part of Virginia. They are currently renting a house. Now, is there a way of forwarding there calls to their cell phones and having the service in the rental house turned off?
-
HT201303 Change country and payment settings
need to change account settings to show new country and payment details. In my account settings doesn't want me to select different country ie other countries don't come up for selection, does anyone know why?
-
Good afternoon, When I try to print to PDF from Illustrator, the following error pops up. Any thoughts on how to correct this? Many thanks! %%[ Error: undefined; OffendingCommand: setdistillerparams; ErrorInfo: CalCMYKProfile U.S. Web Coated (SWOP)
-
Using Firefox, Windows 7 64 bit. Just downloaded and installed(clean) Flash Player, 14_0_0_179 exe. Now get the following error: "The exception unknown software exception(0xc0000710) occurred in the application at location 0x77aca389. Click OK to ter