It's not a secret anymore!
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
JavaRanch » Java Forums » Java » Web Services
Bookmark "Soap vs. FTP for file transfer" Watch "Soap vs. FTP for file transfer" New topic

Soap vs. FTP for file transfer

Elizabeth Fairchild

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?

Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
+ 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

+ 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

Joined: Mar 22, 2000
Posts: 13036
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.
I agree. Here's the link:
subject: Soap vs. FTP for file transfer
It's not a secret anymore!