File Transfer through Java Web Service — Solution

I talked this topic in my previous post. Now I have completed the Centralized Document Transfer and Sharing System. I found that it's not that useful to put my code here. Only how to solve the problem is worth to write.  I use the Netbeans to build this application which is very fast. Netbeans is a great tool to build web service. Here are the steps to make the application run.

1. Use FTP to upload a file. Set up an FTP server first using FileZilla. Open a count for a client to connect and upload files.

2. Use Netbeans to build web service which can store file's information including: file name, version number, file type, and all file information. You will need a database to store those informations. The following is the database diagram.


3. Write web service and ftp client to upload file and connect web service to store file information.

Category >> Web Services  
If you want someone to read your code, please put the code inside <pre><code> and </code></pre> tags. For example:
String foo = "bar";

  1. Naveen on 2012-2-18

    What speacial you have written here? where is the solution? We want to know, how can a webservice is created which takes just the file name selected/browsed bby the user using html file element and uploaded using ftp client. ??? if u user commonsfileupload, it becomes totally Http transfer, what if some external system using SOA want to use the same service?

  2. Best on 2012-12-16

    I am looking for java code to transfer files through sFTP

  3. Hemanth on 2013-2-1

    Hello sir,
    I am using eclipse IDE.
    In my maven project(my POM has SCA apache tuscany plugin) i am able to perform all the operations in web service.But not transferring a file.
    (So plz i need code assistance from you.)

    As of now i am sending byte[] after reading PDF file,But at the recieving end(in client) return type is showing as wrapper type Byte.So i am unable to get PDF out of it.

  4. Roberto on 2014-9-16

    Hint: do a search for
    jax-ws datahandler MTOM

Leave a comment