Here is a wiki article on the concept of web services for any language, including Java:

Web Service - Mac Programming Reference