Previous Section  < Day Day Up >  Next Section

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 connects RMI clients and servers to ports, delivering method calls and responses back and forth.

Most XML-RPC implementations are simpler to implement than RMI. They require method-calling techniques different than Java, unlike an all-Java solution like RMI, but offer a compensating advantage: the ability to work with software developed in other languages.

Q3:

Did people really ask you questions about spam, ticket prices in the Colosseum, and brainfreeze, or did you just make up those questions like you made up this one?

A3:

Every one of those questions was legit. I used to write a newspaper column for the Fort Worth Star-Telegram and the New York Times Newspaper Syndicate that answered any question posed by readers, answering more than 2,500 of them.

If there are any of life's great mysteries you've yet to solve, such as the best way to make a batch of blueberry pancakes without buttermilk, visit this book's website at http://www.java24hours.com and use the feedback link. The ones I'm able to answer will appear on my weblog.

As for the pancakes, whisk one tablespoon of squeezed lemon juice into two cups milk, then let it sit while you prepare the other ingredients. And be careful with the fresh blueberries. Drop them in too early and the pancake will turn a funereal shade of gray.

Q4:

Boxers or briefs?

A4:

Candy-apple red thong underwear with the embroidered text "My dog can beat up Paris Hilton's dog."

    Previous Section  < Day Day Up >  Next Section