*
The moose likes Web Services and the fly likes Soap vs. FTP for file transfer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Soap vs. FTP for file transfer" Watch "Soap vs. FTP for file transfer" New topic
Author

Soap vs. FTP for file transfer

Elizabeth Fairchild
Greenhorn

Joined: Aug 05, 2004
Posts: 1
I need to transfer pdf files from one application (written in C/C++) to another application (written in Java). I have the option of using SOAP or FTP....what is the best method for file transfer? the pro's and con's of each?

Thanks
-EF
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
SOAP:
+ It goes through port 80 (assuming HTTP transport) so you can probably sneak past any existing firewalls on the way
- It's most probably overkill to use SOAP for "just" transferring files
- You need to include a web services engine into your application

FTP:
+ Dead simple
+ It's the standard protocol for transfering files
+ You can get away with very little coding
- FTP is not sexy these days (I had to come up with something for the cons...)


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
Here is another con for FTP
The only control you have over what the receiving party does with it is through the file location and name.
With SOAP you have a whole XML message to communicate with.
A hybrid of FTP to send the file efficiently followed by a SOAP message to say what to do with it would combine the best features.
Bill
 
 
subject: Soap vs. FTP for file transfer