I need to create 5 methods on the server side, which will work with binary data. The remote clients are applet and JavaScript. The Client will send files to the server, and
You are confusing two paradigms here:
You can, for example, implement REST-like services using Servlets.