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.
Caution
As stated, a URI does not have to be a working web address. Although http://ws.java24hours.com
looks like one, it’s used here simply as a unique identifier. I own the domain name java24hours.com and control how its subdomains are used. So ...
Get Sams Teach Yourself Java™ in 24 Hours, Sixth 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.