📄 jaxr2.html
字号:
<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <title>Overview of JAXR</title> <link rel="StyleSheet" href="document.css" type="text/css" media="all" /> <link rel="StyleSheet" href="catalog.css" type="text/css" media="all" /> <link rel="Table of Contents" href="J2EETutorialTOC.html" /> <link rel="Previous" href="JAXR.html" /> <link rel="Next" href="JAXR3.html" /> <link rel="Index" href="J2EETutorialIX.html" /> </head> <body> <table width="550" summary="layout" id="SummaryNotReq1"> <tr> <td align="left" valign="center"> <font size="-1"> <a href="http://java.sun.com/j2ee/1.4/download.html#tutorial" target="_blank">Download</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/faq.html" target="_blank">FAQ</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/history.html" target="_blank">History</a> </td> <td align="center" valign="center"><a accesskey="p" href="JAXR.html"><img id="LongDescNotReq1" src="images/PrevArrow.gif" width="26" height="26" border="0" alt="Prev" /></a><a accesskey="c" href="J2EETutorialFront.html"><img id="LongDescNotReq1" src="images/UpArrow.gif" width="26" height="26" border="0" alt="Home" /></a><a accesskey="n" href="JAXR3.html"><img id="LongDescNotReq3" src="images/NextArrow.gif" width="26" height="26" border="0" alt="Next" /></a><a accesskey="i" href="J2EETutorialIX.html"></a> </td> <td align="right" valign="center"> <font size="-1"> <a href="http://java.sun.com/j2ee/1.4/docs/api/index.html" target="_blank">API</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/search.html" target="_blank">Search</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/sendusmail.html" target="_blank">Feedback</a></font> </font> </td> </tr> </table> <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider"> <blockquote><a name="wp89050"> </a><h2 class="pHeading1">Overview of JAXR</h2><a name="wp89051"> </a><p class="pBody">This section provides a brief overview of JAXR. It covers the following topics:</p><div class="pSmartList1"><ul class="pSmartList1"><a name="wp98849"> </a><div class="pSmartList1"><li><a href="JAXR2.html#wp65186">What Is a Registry?</a></li></div><a name="wp98854"> </a><div class="pSmartList1"><li><a href="JAXR2.html#wp88081">What Is JAXR?</a></li></div><a name="wp98859"> </a><div class="pSmartList1"><li><a href="JAXR2.html#wp65498">JAXR Architecture</a></li></div></ul></div><a name="wp65186"> </a><h3 class="pHeading2">What Is a Registry?</h3><a name="wp65199"> </a><p class="pBody">An XML <em class="cEmphasis">registry</em> is an infrastructure that enables the building, deployment, and discovery of Web services. It is a neutral third party that facilitates dynamic and loosely coupled business-to-business (B2B) interactions. A registry is available to organizations as a shared resource, often in the form of a Web-based service.</p><a name="wp65200"> </a><p class="pBody">Currently there are a variety of specifications for XML registries. These include </p><div class="pSmartList1"><ul class="pSmartList1"><a name="wp65201"> </a><div class="pSmartList1"><li>The ebXML Registry and Repository standard, which is sponsored by the Organization for the Advancement of Structured Information Standards (OASIS) and the United Nations Centre for the Facilitation of Procedures and Practices in Administration, Commerce and Transport (U.N./CEFACT)</li></div><a name="wp88079"> </a><div class="pSmartList1"><li>The Universal Description, Discovery, and Integration (UDDI) project, which is being developed by a vendor consortium</li></div></ul></div><a name="wp88080"> </a><p class="pBody">A <em class="cEmphasis">registry provider</em> is an implementation of a business registry that conforms to a specification for XML registries.</p><a name="wp88081"> </a><h3 class="pHeading2">What Is JAXR?</h3><a name="wp65212"> </a><p class="pBody">JAXR enables Java software programmers to use a single, easy-to-use abstraction API to access a variety of XML registries. A unified JAXR information model describes content and metadata within XML registries. </p><a name="wp65213"> </a><p class="pBody">JAXR gives developers the ability to write registry client programs that are portable across different target registries. JAXR also enables value-added capabilities beyond those of the underlying registries.</p><a name="wp65214"> </a><p class="pBody">The current version of the JAXR specification includes detailed bindings between the JAXR information model and both the ebXML Registry and the UDDI version 2 specifications. You can find the latest version of the specification at</p><div class="pPreformattedRelative"><pre class="pPreformattedRelative"><a href="http://java.sun.com/xml/downloads/jaxr.html" target="_blank">http://java.sun.com/xml/downloads/jaxr.html</a><a name="wp75418"> </a></pre></div><a name="wp65253"> </a><p class="pBody">At this release of the J2EE platform, JAXR implements the level 0 capability profile defined by the JAXR specification. This level allows access to both UDDI and ebXML registries at a basic level. At this release, JAXR supports access only to UDDI version 2 registries.</p><a name="wp106032"> </a><p class="pBody">Currently several public UDDI version 2 registries exist. </p><a name="wp89699"> </a><p class="pBody">The Java Web Services Developer Pack (Java WSDP) Registry Server provides a UDDI version 2 registry that you can use to test your JAXR applications in a private environment. You can download the Java WSDP from <code class="cCode"><a href="http://java.sun.com/webservices/download.html" target="_blank">http://java.sun.com/webservices/download.html</a></code>. The Registry Server includes a database based on the native XML database Xindice, which is part of the Apache XML project. This database provides the repository for registry data. The Registry Server does not support messages defined in the UDDI Version 2.0 Replication Specification.</p><hr><a name="wp79166"> </a><p class="pNote">Note: If you use the Java WSDP Registry Server to test JAXR applications that you develop using the J2EE 1.4 Application Server, make sure that in your <code class="cCode">PATH</code> you place the J2EE 1.4 Application Server <code class="cCode">bin</code> directories before the Java WSDP <code class="cCode">bin</code> directories.</p><hr><a name="wp106300"> </a><p class="pBody">Several ebXML registries are under development, and one is available at the Center for E-Commerce Infrastructure Development (CECID), Department of Computer Science Information Systems, The University of Hong Kong (HKU). For information, see <code class="cCode"><a href="http://www.cecid.hku.hk/Release/PR09APR2002.html" target="_blank">http://www.cecid.hku.hk/Release/PR09APR2002.html</a></code>.</p><a name="wp88048"> </a><p class="pBody">A JAXR provider for ebXML registries is available in open source at <code class="cCode"><a href="http://ebxmlrr.sourceforge.net" target="_blank">http://ebxmlrr.sourceforge.net</a></code>.</p><a name="wp65498"> </a><h3 class="pHeading2">JAXR Architecture</h3><a name="wp65502"> </a><p class="pBody">The high-level architecture of JAXR consists of the following parts:</p><div class="pSmartList1"><ul class="pSmartList1"><a name="wp65523"> </a><div class="pSmartList1"><li>A <em class="cEmphasis">JAXR client</em>: a client program that uses the JAXR API to access a business registry via a JAXR provider.</li></div><a name="wp65535"> </a><div class="pSmartList1"><li>A <em class="cEmphasis">JAXR provider</em>: an implementation of the JAXR API that provides access to a specific registry provider or to a class of registry providers that are based on a common specification.</li></div></ul></div><a name="wp69105"> </a><p class="pBody">A JAXR provider implements two main packages:</p><div class="pSmartList1"><ul class="pSmartList1"><a name="wp65579"> </a><div class="pSmartList1"><li><code class="cCode">javax.xml.registry</code>, which consists of the API interfaces and classes that define the registry access interface.</li></div><a name="wp65596"> </a><div class="pSmartList1"><li><code class="cCode">javax.xml.registry.infomodel</code>, which consists of interfaces that define the information model for JAXR. These interfaces define the types of objects that reside in a registry and how they relate to each other. The basic interface in this package is the <code class="cCode">RegistryObject</code> interface. Its subinterfaces include <code class="cCode">Organization</code>, <code class="cCode">Service</code>, and <code class="cCode">ServiceBinding</code>.</li></div></ul></div><a name="wp65578"> </a><p class="pBody">The most basic interfaces in the <code class="cCode">javax.xml.registry</code> package are</p><div class="pSmartList1"><ul class="pSmartList1"><a name="wp65645"> </a><div class="pSmartList1"><li><code class="cCode">Connection</code>. The <code class="cCode">Connection</code> interface represents a client session with a registry provider. The client must create a connection with the JAXR provider in order to use a registry.</li></div><a name="wp65565"> </a><div class="pSmartList1"><li><code class="cCode">RegistryService</code>. The client obtains a <code class="cCode">RegistryService</code> object from its connection. The <code class="cCode">RegistryService</code> object in turn enables the client to obtain the interfaces it uses to access the registry.</li></div></ul></div><a name="wp65576"> </a><p class="pBody">The primary interfaces, also part of the <code class="cCode">javax.xml.registry </code>package, are</p><div class="pSmartList1"><ul class="pSmartList1"><a name="wp65567"> </a><div class="pSmartList1"><li><code class="cCode">BusinessQueryManager</code>, which allows the client to search a registry for information in accordance with the <code class="cCode">javax.xml.registry.infomodel</code> interfaces. An optional interface, <code class="cCode">DeclarativeQueryManager</code>, allows the client to use SQL syntax for queries. (The implementation of JAXR in the J2EE Application Server does not implement <code class="cCode">DeclarativeQueryManager</code>.)</li></div><a name="wp65670"> </a><div class="pSmartList1"><li><code class="cCode">BusinessLifeCycleManager</code>, which allows the client to modify the information in a registry by either saving it (updating it) or deleting it.</li></div></ul></div><a name="wp65938"> </a><p class="pBody">When an error occurs, JAXR API methods throw a <code class="cCode">JAXRException</code> or one of its subclasses.</p><a name="wp69468"> </a><p class="pBody">Many methods in the JAXR API use a <code class="cCode">Collection</code> object as an argument or a returned value. Using a <code class="cCode">Collection</code> object allows operations on several registry objects at a time.</p><a name="wp88107"> </a><p class="pBody"><a href="JAXR2.html#wp65255">Figure 10-1</a> illustrates the architecture of JAXR. In the J2EE Application Server, a JAXR client uses the capability level 0 interfaces of the JAXR API to access the JAXR provider. The JAXR provider in turn accesses a registry. The J2EE Application Server supplies a JAXR provider for UDDI registries.</p><a name="wp88586"> </a><p class="pBody"></p><div align="left"><img src="images/Fig11-1.gif" height="235" width="341" alt="JAXR Architecture" border="0" hspace="0" vspace="0"/></div><p class="pBody"></p><p> <a name="65255"> </a><strong><font >Figure 10-1 JAXR Architecture</font></strong></p> </blockquote> <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider"> <table width="550" summary="layout" id="SummaryNotReq1"> <tr> <td align="left" valign="center"> <font size="-1"> <a href="http://java.sun.com/j2ee/1.4/download.html#tutorial" target="_blank">Download</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/faq.html" target="_blank">FAQ</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/history.html" target="_blank">History</a> </td> <td align="center" valign="center"><a accesskey="p" href="JAXR.html"><img id="LongDescNotReq1" src="images/PrevArrow.gif" width="26" height="26" border="0" alt="Prev" /></a><a accesskey="c" href="J2EETutorialFront.html"><img id="LongDescNotReq1" src="images/UpArrow.gif" width="26" height="26" border="0" alt="Home" /></a><a accesskey="n" href="JAXR3.html"><img id="LongDescNotReq3" src="images/NextArrow.gif" width="26" height="26" border="0" alt="Next" /></a><a accesskey="i" href="J2EETutorialIX.html"></a> </td> <td align="right" valign="center"> <font size="-1"> <a href="http://java.sun.com/j2ee/1.4/docs/api/index.html" target="_blank">API</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/search.html" target="_blank">Search</a> <br> <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/information/sendusmail.html" target="_blank">Feedback</a></font> </font> </td> </tr> </table> <img src="images/blueline.gif" width="550" height="8" ALIGN="BOTTOM" NATURALSIZEFLAG="3" ALT="Divider"><p><font size="-1">All of the material in <em>The J2EE(TM) 1.4 Tutorial</em> is <a href="J2EETutorialFront2.html">copyright</a>-protected and may not be published in other workswithout express written permission from Sun Microsystems.</font> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -