Q&A

Q1:My XML-RPC handler class has public methods that return void because I don't need a returned value. Why don't these work in XML-RPC?
A1: They may work in other implementations of the XML-RPC protocol, but Apache XML-RPC doesn't support void as a return type in classes that receive method calls.

The LottoCounter class didn't need to return a value in its sendRequest() method either, so it returns the Boolean value true in all circumstances.

Q2:How does XML-RPC compare to RMI?
A2: Remote Method Invocation (RMI) is a technique to call one Java class from another class over any network. RMI requires placeholder classes called stubs and skeletons that serve as proxies for classes on a different computer.

RMI also requires a registry tool that ...

Get SAMS Teach Yourself Programming with Java™ in 24 Hours, FOURTH EDITION now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.