aaime
Mar 7th, 2005, 04:31 AM
Hi,
so far I've been using the Spring remoting capabilities to make transparent the location of the services I'm using. Basically, I'm developing a swing based client that, in production, should talk so a Tomcat server, but to ease development and debugging, for the moment I'm mostly testing it against local services (that is, the Swing client connects directly to the database).
This has proven to work fine so far, but now I'm facing a problem. The client should exchange files with the server, both upload and download. I know I can do this by using the HTTPClient library, but this would make the code location dependent (I would need one implementation for a local filesystem, and another for HTTP streaming)
I'm wondering, if I have an interface like this:
interface FileService {
InputStream getFile(Long fileId);
void putFile(Long fileId, InputStream stream);
}
would it be possibile to remote it with Spring and HTTPInvoker, and have it properly deal with the streaming part transparently? Am I asking too much? ;-)
so far I've been using the Spring remoting capabilities to make transparent the location of the services I'm using. Basically, I'm developing a swing based client that, in production, should talk so a Tomcat server, but to ease development and debugging, for the moment I'm mostly testing it against local services (that is, the Swing client connects directly to the database).
This has proven to work fine so far, but now I'm facing a problem. The client should exchange files with the server, both upload and download. I know I can do this by using the HTTPClient library, but this would make the code location dependent (I would need one implementation for a local filesystem, and another for HTTP streaming)
I'm wondering, if I have an interface like this:
interface FileService {
InputStream getFile(Long fileId);
void putFile(Long fileId, InputStream stream);
}
would it be possibile to remote it with Spring and HTTPInvoker, and have it properly deal with the streaming part transparently? Am I asking too much? ;-)