Web services, while not strictly an XML technology, depends heavily on XML for both its definition language, Web Services Description Language (WSDL), and its messaging protocol, Simple Object Access Protocol (SOAP). Alongside its various descendants, WSDL itself builds on previous XML technologies, such as XML Schema, to provide an abstraction layer over which service endpoints can be defined in terms of messages and operations. Similarly, SOAP provides a mechanism for issuing remote procedural calls and document transactions between distributed systems.
Correspondingly, XQuery provides a rich, data-oriented language for interacting with XML and XML-mapped data sources. It builds on existing XML technologies such as XPath and XML Schema to provide a unified query language over both weakly typed (streams, Web sites) and strongly typed (databases, messages) XML sources. Unlike other query languages, such as SQL, it is intended to not only be a database query language, but a general language for natively interacting with XML as well.
Both technologies have starring roles in new methodologies for solving old problems. Service-oriented architecture (SOA) promises to open up all of the applications in the enterprise via Web services. With it, application developers can build new applications from the functions and features of existing applications. Enterprise Information Integration (EII), utilizing XQuery, makes a similar promise: to present a single front end to all of the databases and data sources available on the network. In both cases, the goal is to bring together the processes and data we interact with individually in a manner that reduces the amount of custom mapping required for each source.