23-01-2012, 04:32 PM
The Java™ Web Services Tutorial
JavaWSTutorial.pdf (Size: 2.52 MB / Downloads: 50)
Copyright © 2005 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A.
All rights reserved.U.S. Government Rights - Commercial software. Government users are subject to the
Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements.
This distribution may include materials developed by third parties.
Sun, Sun Microsystems, the Sun logo, Java, J2EE, JavaServer Pages, Enterprise JavaBeans, Java Naming
and Directory Interface, EJB, JSP, J2EE, J2SE and the Java Coffee Cup logo are trademarks or registered
trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
JAXB Binding Framework
The JAXB binding framework is implemented in three Java packages:
• The javax.xml.bind package defines abstract classes and interfaces that
are used directly with content classes.
The javax.xml.bind package defines the Unmarshaller, Validator,
and Marshaller classes, which are auxiliary objects for providing their
respective operations.
More About javax.xml.bind
The three core functions provided by the primary binding framework package,
javax.xml.bind, are marshalling, unmarshalling, and validation. The main client
entry point into the binding framework is the JAXBContext class.
JAXBContext provides an abstraction for managing the XML/Java binding information
necessary to implement the unmarshal, marshal and validate operations.
A client application obtains new instances of this class by means of the
newInstance(contextPath) method; for example:
JAXBContext jc = JAXBContext.newInstance(
"com.acme.foo:com.acme.bar" );
More About Unmarshalling
The Unmarshaller class in the javax.xml.bind package provides the client
application the ability to convert XML data into a tree of Java content objects.
The unmarshal method for a schema (within a namespace) allows for any global
XML element declared in the schema to be unmarshalled as the root of an
instance document. The JAXBContext object allows the merging of global elements
across a set of schemas (listed in the contextPath). Since each schema in
the schema set can belong to distinct namespaces, the unification of schemas to
an unmarshalling context should be namespace-independent.