Best practice with service interfaces is to pass messages that have been specifically crafted to contain information about the requested operation, not lists of objects. Any interface where you are basically just taking a call that could have been a local method call and exposing it over the wire may be a web service, but that doesn't mean it's service oriented. It is often a good idea not even to use objects from your domain model directly, because you want your service interface to be stable.
--- In [email protected], Sasan <sasanp...@...> wrote: > > Hi, > > Is it good practice to have a service that exposes a method with a List of > objects as a parameter? Programmatically speaking from Java programming point > of view java.util.List. > > Example: > > public int method(java.util.List objects) > > Even if the interface is documented, I do not see this as a good practice > cause this tells me the method takes a list of basically any object type. > This could be troublesome for clients that discover services dynamically. > > I appreciate all opinions on this. > > Thanks, > Sasan >
