public class RemoteObject {
public String getMessage() {
return "Hello, client!";
}
}
<destination id="remoteObjectService">
<properties>
<adapter ref="java-object" />
</properties>
</destination>
class Client {
public static void main(String[] args) {
MessageService service = new MessageService();
service.connect("http://localhost/blazeds");
String message = (String) service.invoke("remoteObjectService", "getMessage");
System.out.println(message);
}
}