Java Reference
In-Depth Information
Many people have argued that Sun Microsystems should never have added support
forwebservicestoJava6.OnecriticismisthatJAX-WS(themainwebservicesAPI)
encourages a bottom-up approach to building a web service —develop a Java class
firstandthendeveloptheWSDLcontract.Incontrast,thosewhopreferatop-down
approachbelievethatcreatingtheWSDLandschemasfirstprovidesthebestchance
for interoperability (especially when technologies and platforms at both ends of the
connectionaredifferent),becausedoingsoencouragesaninterface-baseddesignap-
proach that provides maximum reuse and interoperability.
Davanum Srinivas states two additional criticisms in his “Why bundling JAX-WS
inJava6wasabadidea!”blogpost( http://blogs.cocoondev.org/dims/
archives/004717.html ) .First,hepointsouttheneedtorelyonthe Java En-
dorsed Standards Override Mechanism (see http://download.oracle.com/
javase/6/docs/technotes/guides/standards/ ) to use a subsequent
version of JAX-WS (with its new features and/or bug fixes). For example, Java
6 shipped with JAX-WS 2.0. To use its JAX-WS 2.1 successor, you would have
to use the Java Endorsed Standards Override Mechanism as described in Vivek
Pandey's “Webservices in JDK 6” blog post ( http://weblogs.java.net/
blog/vivekp/archive/2006/12/webservices_in.html ) . Srinivas's
secondcomplaintisthatJava6'swebservicesimplementationdoesn'tsupportWS-I
profiles such as WS-Security.
Arun Gupta, a member of the Sun Microsystems team that integrated web services
support into Java 6, counters these criticisms in his “Web services native support
in Java6” blog post ( http://blogs.oracle.com/arungupta/entry/
web_services_native_support_in ).
Web Service APIs
Javaprovidesseveral APIsthat supportwebservices. Inaddition tothevariousJAXP
APIsthatIdiscussedin Chapter10 (andwhicharealsousedapartfromwebservices),
Java provides the JAX-WS, JAXB, and SAAJ APIs:
Java API for XML Web Services (JAX-WS) :ThemainAPIforbuildingwebser-
vices and clients (in Java) that communicate via XML. JAX-WS replaces the
olderJavaAPIforRemoteProcedureCallWebServices(JAX-RPC)API,and
is assigned package javax.xml.ws and various subpackages. Java 7 sup-
ports JAX-WS 2.2.4.
Java Architecture for XML Binding (JAXB) : The API for mapping XML
Schema-based data types to Java objects and vice versa —see Chapter 10 to
learnaboutXMLSchema.JAX-WSdelegatesdata-bindingtaskstoJAXB.This
Search WWH ::




Custom Search