Summary


This chapter has focused on explaining some of the core features of XML and related technologies. The goal was to prepare you for the Web servicerelated material in the rest of the book, which relies heavily on the concepts presented here. To this end, we covered, in some detail:

  • The origins of XML and the fundamental difference between document- and data-centric XML applications. Web services are an extreme example of data-centric XML use. The material in this chapter purposefully ignored some aspects of XML that are more document-oriented .

  • The syntax and rules governing the physical structure of XML documents: document prologs, elements, attributes, character content, CDATA sections, and so on. We omitted document-oriented features of XML such as entities and notations due to their infrequent use in the context of Web services. The SkatesTown purchase order document format made its initial appearance.

  • XML Namespaces, the key tool for resolving the problems of name recognition and name collision in XML applications. Namespaces are fundamental to mixing information from multiple schemas into a single document, something that all core Web service technologies rely upon. SkatesTown's purchase order inside an XML message wrapper is an example of a common pattern for XML use that will be explored in depth in the next chapter. The namespace mechanism is simple and beautiful; however, people often try to read more into it than is really there, as demonstrated by the debate over whether namespace URIs should point to meaningful resources. One of the slightly more complex aspects of the specification is the multiple namespace defaulting mechanisms that simplify document markup while preserving namespace information.

  • The concepts of well- formedness and validity and Document Type Definitions (DTDs) as a mechanism to validate XML document structure. DTDs are powerful, but they also have great limitations such as non-XML syntax, no ties to namespaces, and poor support for even basic data types such as numbers and dates.

  • XML Schema, the de facto standard for describing document structure and XML datatypes for data-oriented applications. Although XML Schema is a recent standard, the XML community had defined specifications based on draft versions of the standard for nearly two years . The flexible content models, the large number of pre-defined datatypes and the powerful extensibility and reuse features make this one of the most important developments in the XML space since XML 1.0. All Web service specifications are described using schema. Through the definition of SkatesTown's purchase order and invoice schemas, this chapter introduced enough of the key capabilities of the technology to prepare you for what is to come in the rest of the book.

  • The key mechanisms for creating and processing XML with software. Starting with the basic syntax-oriented XML processing architecture, the chapter progressed to define a data-oriented XML processing architecture together with the key concepts of XML data mapping and XML parsing. In the context of SkatesTown's desire to independently validate invoice totals sent to its customers, we used the Java APIs for XML Processing (JAXP), the Simple APIs for XML (SAX), and the XML Document Object Model (DOM) to build two separate implementations of an invoice checker. A simple Web-based front end served as the test bed for the code.

This chapter explicitly did not focus on other important but not very relevant XML technologies such as XPointer/XLink, Resource Definition Framework (RDF), XPath, Extensible Stylesheet Language Transformations (XSLT), or XQuery. They are important in their own domains and useful to be familiar with in general but are not commonly used in the context of Web services. Other more technical XML specification such as XML Digital Signatures will be introduced later in the book as part of meaningful Web service usage scenarios.

Right now, you know enough about XML to go deep into the exciting world of Web services. Chapter 3 introduces the core Web service messaging technologies: Simple Object Access Protocol (SOAP) and XML Protocol (XMLP).



Building Web Services with Java. Making Sense of XML, SOAP, WSDL and UDDI
Building Web Services with Java: Making Sense of XML, SOAP, WSDL and UDDI
ISBN: B000H2MZZY
EAN: N/A
Year: 2001
Pages: 130

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net