<p>I'm new to both Web Services and RMI and I wonder which is the better way to do remoting between different web applications, when these applications are all written in Java, that is when different programming languages don't matter (which would be the advantage of WS).</p>

<p>While on the one hand I would guess that there's a performance overhead when using web services (does anyone have some numbers to prove that?), on the other hand it seems to me that web services are much more loosely coupled and can be used to implement a more service-oriented architecture (SOA) (which isn't possible with RMI, right?).</p>

<p>Although this is quite a general question, what's your opinion?</p>

<p>Thanks</p>

My experience with RMI and Web Services mirrors your guesses above.  In general, RMI's performance exceeds web services, if the communication requirement is for complex objects. The JEE interface specification needs to be explicitly specified for Web Services.
Note that Web Services are interoperable whereas RMI is not (in terms of the technologies of Client and Server).  I tend to use Web Services when I had one or more external partners who were implementing the interface, but RMI if I was in control of both ends of the connection.