Hi there, I have an API that manipulate files. Every project that uses this funcitionality must have their own code to manipulate this.... Im thinking to create an application that can be acessed and it returns the pdf file instead to implement this in all applications that need to have this funcionality.
The question is.. What is the best approach to easily create this?? Maibe EJB, Webservices?? Spring maibe??
Instead of putting code in every application I need to access my API, I would like to create a project that runs as a service to all others, so I would have control in one place. I wanted to get ideas about doing that in a practical way and give me good results.
I hope now you can understand better... Thanks anyway !!
Okay, we are making progress. So now we know that you want to provide "a service".
But that isn't much progress. "A service" could mean almost anything. If you want to discuss the pros and cons of how to implement a service, you do have to take into account what that service actually does.
For example: Let's suppose that you have code which is designed to do something with files on the local computer. Then declaring that you want to make that into a "service" which will run on a server somewhere else would be a bad decision. That's what I mean when I say you have to know what the service does.
Frankly I think you're wasting your time with this question. I certainly don't plan to waste any more of my time with it.
I understood that you intend to build an application which will serve several clients. Those clients will 'ask' for pdf files or any other format. Am I right?
If so, i think that a good approach would be a EJB service being exposed as a webservice. So, any other applications could reach its endpoint and get the files. As a request your EJB service, I mean your webservice, receives the required parameters to build or retrieve the contents of a pdf file. In other hand, as response, webservices gives back a path file (a download link), stores the file in DB or even attaches the pdf file to response.
If you're using Oracle SOA Suite technologies, this task can be made easier through file and db adapters in SCA Composites. However, if you don't use such technologies, you can achieve the same results by building webservices.