Java Reference
In-Depth Information
C H A P T E R 11
Working with Web Services
Web services are popular and widely used, and Java supports their development. This
chapter shows you how to use Java's web service development features to create your
own web services and/or access web services created by others.
Chapter 11 first introduces you to the topic of web services, emphasizing the SOAP-
based and RESTful categories. This chapter then reveals Java's support for web service
developmentintermsofitswebservice-orientedAPIs,annotations,andtools.Youalso
learnaboutJava'slightweightHTTPserverfordeployingyourwebservicestoasimple
web server and testing them in this environment.
ArmedwithabasicunderstandingofwebservicesandJava'ssupportfortheirdevel-
opment,younextlearnhowtodevelopSOAP-basedandRESTfulwebservices.Foreach
webservicecategory,youlearnhowtocreateandaccessyourownwebservice,andthen
learn how to access an external web service.
Chapter 11 closes by presenting five advanced web service topics: accessing SOAP-
based web services via the SAAJ API, installing a JAX-WS handler to log the flow of
SOAPmessages,installingacustomizedlightweightHTTPservertoperformauthentic-
ation,sendingattachmentstoclientsfromaRESTfulwebservice,andusingdispatchcli-
ents with providers.
What Are Web Services?
Nostandarddefinitionforwebservicehasyetbeendevisedbecausethistermmeansdif-
ferentthingstodifferentpeople.Forexample,somepeopledefinewebserviceasaweb
application;othersdefinewebserviceintermsofaprotocol(e.g.,SOAP)that'susedby
applicationstocommunicateacrosstheWeb.Perhapsthebestwaytodefinewebservice
is to first define this term's parts:
Web : A huge interconnected network of resources, where a resource is a Uni-
form Resource Identifier (URI)-named data source such as a spreadsheet docu-
Search WWH ::




Custom Search