Creating a Web Service Client

In this section, you create SquareRootClient, a Java application that can call the methods of the web service you just created. The service must, of course, be running for the client to connect to it.

Because web service technology like the JAX-WS library supports standards such as SOAP, REST, HTTP, and XML, you don’t have to use a Java program to connect to the square root web service. Perl, Python, Ruby and other languages all have libraries that support web services.


As stated, a URI does not have to be a working web address. Although looks like one, it’s used here simply as a unique identifier. I own the domain name and control how its subdomains are used. So ...

Get Sams Teach Yourself Java™ in 24 Hours, Sixth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.