FTP put and get issue

I am tring to receive a edi file and I want to receive it via FTP.
The client will submit the file to my (IS server 4.6 without trading networks)ftp server. I have opened a port 21 to receive the file. When the client does a login and put a file to my service , how do I capture the file. What needs to be done in the service that is receiving the file. When I try to restore the pipeline I do not see any data. As per the documentation I need to do a ftp get with the filename.out.


Assuming that you are using IS 4.6. Create an input for your service named contentStream of object type. Convert the stream to anything that you need using available services.


The problem is I do not see any thing in the pipeline when I restore it.

Streams do not get saved. So it would be wise to convert it to String or use writetofile to pass it to a file.

Did not work. I converted the contentStream object to save it to file, but the service failed because it did not find the object at runtime.


Thankyou very much, chirag sanghavi


Create a new flow service that takes one input named anything you want of type “object”. (I called mine “inputNode”).

Map this object to the “node” input parameter of the pub.record:documentToRecord service in the first statement of your Flow service.

For debugging purposes, add a pub.record:recordToDocument statement and map the boundnode created in step 1 to the input of recordToDocument. Then map the string “xmldata” into the “message” parameter of the pub.flow:debugLog statement. You should see the contents of the xml file you sent to your service printed in the server log (hint: test with a small XML file first).

To send an xml file to your flow service using FTP, change to the folder corresponding to the service that you want to receive the file (e.g. “cd ns/<folder>/<subfolder>/<servicename>”) and then use the FTP “put” command to send your XML file. In IS 4.6, if you want to process documents other than XML (or text I think) you will need to create a custom contentHandler. There are numerous threads on that topic elsewhere on this forum.

My working example looks like this



Mark, I was looking around the forums for an answer to a situation I have with Business Connector 4.6. I stumbled on your answer to BC which appears to be what I am looking for.

My situation is that we receive IDocs from SAP R/3 4.6, the Flow processes and reformats this data and then uses pub.client:ftp to send as XML to an IP address (RS/6000 running WebConnect and Manugistics) within our intranet. WebConnect sends XML documents back to Buscon via http.

The WebConnect/Manugistics box has been outsourced and now Buscon will have to use secure FTP to send & receive. We have purchased a SFTP product from SSH Secure Shell. My biggest headache now is how, in the Flow, to dump the XML to disk and invoke a DOS command to SFTP to the remote IP address. Also, how, in the Flow, to retrieve XML documents that were dumped on the hard drive by a remote SFTP process from the remote Webconnect/Manu box.

Any help would be greatly appreciated. Thanks, spy.


Search the shareware section of WM Users for examples for executing scripts or commands from the command prompt and for examples on writing data to a file system. I think you can find both there. If not, let us know and I’m sure the folks here can help.


Rob Eamon contributed a package that contains several ZIP functions. The package also includes a service that will write a byte array to a file in the file system.

You can get that one here: http://www.wmusers.com/software/uploads/3940zipsample.zip

Igor Androsov posted a collection of utilities some time ago that contains several file i/o services that you might also find useful. You can get it here: http://www.wmusers.com/software/uploads/1631toolbox.zip

The WmSamples package contains a sample service that executes a operating system command or executes a shell script. A thread that discusses its use can be found here: http://www.wmusers.com/wmusers/messages/117/1437.shtml



Mark, unfortunately I don’t speak Java. My background is 19 years using RPG on the IBM System/34/36/38 and AS/400. My company went live last February with SAP R/3 running on RS/6000s. An interface that I had developed between the AS/400 and a small RS/6000 running Manugistics had to be rebuilt.
It was decided to use SAP Buscon to talk between SAP R/3 and the existing Manugistics AIX box.
Webconnect was added as a front end to Manu.

Now the WebConect/Manu box is to be outsourced. It is currently within our intranet but will become a remote box at the outsourcer’s location, and so the need to be able to utilize SFTP.
I installed SSH Secure Shell on the Buscon W2k Server today so that we can use its SFTP2 process.

Networking, java, Flow, etc… is new to me but I am catching on slowly. Big learning curve!
So, I need a solution to my predicament in fairly simple terms, if possible. I do understand that your environment is complex.

I read the articles from the last link you supplied but they are talking java and it may as well be Martian!
I grabbed the code from the first 2 links you supplied. I will check them out in the Buscon Developer.

I appreciate your time and effort in assisting me. Well, I’d better go check that code.

Thanks, spy.