views:

13

answers:

1

Is it possible to make two jax-ws web services that are deployed within the same container exchange large objects in more efficient manner than serializing them into soap?

A: 

If both endpoints are within the same container, why are you using a web service? If you're exchanging domain objects that are the same between endpoints, and you don't need a layer of abstraction, simple byte array serialization might be a better solution in this case. Depending on what exactly you have running, you might even be able to do an in-memory exchange.

jmar777
Both services are called by external clients as well. It isn't good option to merge these services into one for the next reason. The second service depends on the first one, and soon I'm likely to have three or more services, all of them depending on the first one. I would prefer not to reimplement the same functions in all the services. I'm running Glassfish 2.1
greycat
Not knowing your business needs, I can't really comment on whether that complexity is due or not. As a generalization though, I'd just caution against accepting all of that IO and CPU overhead due to transfer/serialization needs (when the data was on the local machine all along). I'm all for DRY, but there may be some higher priorities in play...
jmar777
The problem is to pass a large byte stream (about 500Mb) between services. Now I use MTOM, but it does buffering to the hard drive. It suits well for passing the stream from remote client to the service, but not for exchanging it between the services on the same machine. It would be great if there's a way to pass a handle to the stream as an object reference.
greycat