Hi, I came across this issue in an RCP project. The credentials can never be changed on a proxy object.

The reason is that calling setUsername() and setPassword() on the
proxy factory will only set the internal username and password. The
only time this is used is when the Caucho proxy is created, which is
in the prepare method of the proxy factory. Since the Caucho proxy is
already created at the time the proxy factory is updated with the
username and password, nothing happens and the real proxy never gets
the credentials.

IMO the simplest fix for this would be a change in the main Spring
proxy factory to move the username and password setup from prepare()
to invoke(). This is the piece (ex. from HessianClientInterceptor):

if (getUsername() != null) {
this.proxyFactory.setUser(getUsername());
}
if (getPassword() != null) {
this.proxyFactory.setPassword(getPassword());
}

I have tested this and it works because the Hessian proxy builds the
auth header on every call. And it calls back into the proxy factory to
do this. Does this make sense?

Thanks.

Jess