This post originated from an RSS feed registered with Java Buzz
by News Manager.
Original Post: Web services in Java SE, Part 2
Feed Title: JavaWorld
Feed URL: http://www.javaworld.com/index.rss
Feed Description: JavaWorld.com: Fueling Innovation
JAX-WS supports SOAP-based Web services. Part 2 of this four-part series on Java SE Web services defines a SOAP-based units-conversion Web service, builds and then verifies this Web service locally via the default lightweight HTTP server (discussed in Part 1), interprets the service's WSDL document, and accesses the service from a simple client.
Defining a units-conversion web service
The units-conversion Web service, which I've named UC, consists of four functions for converting between centimeters and inches and between degrees Fahrenheit and degrees Celsius. Although this example could be architected as a single Java class, I've chosen to follow best practices by architecting it as a Java interface and a Java class. Listing 1 presents the Web service's UC interface.