You are not providing enough information for your question to be answered. What do you mean a file from a Java application? Is it an image, if so what type, is it something interactive if so what type. What do you want it to do when you have uploaded it. What version of Moodle are you using. Or are you referring to causing a Java application to do the upload which is implied by your reference to web services, if so what key words have you searched on, have you looked at the following