Sams Teach Yourself Java™ in 24 Hours (Covering Java 7 and Android)

(singke) #1
ptg7068951

324 HOUR 22:Creating Web Services with JAX-WS


Q&A
Q. How does XML-RPC fit in with SOAP web services?
A. XML-RPC is a protocol for calling methods and receiving data in an XML
format over HTTP,the protocol of the Web. SOAP is all those things as
well,and in fact the two web service protocols share a common origin.
XML-RPC was created from a draft version of the protocol that eventual-
ly became SOAP. Because XML-RPC was out first and is simpler to
implement,it developed its own following and remains popular today.
The Apache XML-RPC Java library,available from http://ws.apache.org/
xmlrpc,supports the creation of web services and clients that employ
XML-RPC.
SOAP’s a more sophisticated web service protocol that supports a
wider range of client/service interactions.

Q. I’m not clear on why a package named com.java24hours.wsis asso-
ciated with the Internet host ws.java24hours.com. How does that
work?
A. Java package names are created by the programmers who developed
the package. Oracle starts the names of Java packages from the Java
class library with either javaorjavax, such as java.utiland
javax.swing. When other programmers create package,they follow a
convention that prevents two entities from choosing the same package
name and being confused with each other.
The convention is to choose a package name that’s based on some-
thing the entity owns—a domain name. As the owner of the domain
namecadenhead.org, I’ve created Java classes with package names
that begin with org.cadenhead, such as org.cadenhead.web. The
Apache Software Foundation,which owns apache.org, calls its XML-RPC
packageorg.apache.xmlrpc.

Q. What was the first website on the Internet?
A. The first site was http://info.cern.ch,which is still online today. Tim
Berners-Lee,a physicist at the European Organization for Nuclear
Research (CERN),used the site to describe his new invention,the
World Wide Web.
The first webpage was at http://info.cern.ch/hypertext/WWW/
TheProject.html and was updated daily as the Web attracted users,pub-
lishers,and software developers.
The site defined the web as a “a wide-area hypermedia information
retrieval initiative aiming to give universal access to a large universe of
documents.”
Free download pdf