File eXchange Protocol
编程语言
2018-05-14 08:50:27
阅读次数: 1
http://en.wikipedia.org/wiki/File_eXchange_Protocol
File eXchange Protocol (FXP) and (FXSP) is a method of data transfer which uses the FTP protocol to transfer data from one remote server to another (inter-server) without routing this data through the client's connection. |
https://wmusers.com/forum/showthread.php?t=18491
Consider using the proxy command. This command is not supported by all FTP servers, but see if yours support it. |
|
It works kinda like this: |
1) Login to your source FTP server |
2) Issue a proxy open <target server>. You can do this using the quote service. |
3) Issue a proxy user <username> <password> |
4) Issue a proxy put <source server filename> <target server filename> |
|
This way you transfer the file directly from one FTP server to another without having to worry about consuming resources on the webMethods server. |
|
Good luck, |
Percio |
The steps for using IS to transfer the file: |
|
1. Login to the source FTP server (A). |
2. Use get to retrieve the file from A. Specify 0 for the largefilethreshold and null for localfile. This will write the content to a temporary file and return an input stream. |
3. Logout of A. |
4. Login to the target FTP server (B). |
5. Use put to put the file to B. Pass the stream returned by the get in step 2. |
6. Close the stream (just to be safe in case put doesn't do so). |
7. Logout of B. |
8. Remove/archive the temp file--I'm not sure if IS automatically deletes the file on close. If it doesn't, then you'll want to use an explicit dynamic filename in the get in step 2 so you can move/delete it later. |
|
Of course check errors after each step. |
|
Be sure to use transfermode set to binary if appropriate (usually the case). |
__________________ |
-Rob |
http://reamon.squarespace.com |
转载自arcko.iteye.com/blog/807651