Oracle9i Application Server Web Services Developer's Guide Release 2 (9.0.2) Part Number A95453-01 |
|
Oracle9iAS Containers for Java2 Enterprise Edition (J2EE), or OC4J, provides a Universal Discovery Description and Integration (UDDI) Web Services registry in which Web Service provider administrators in an enterprise environment can publish their Web Services for use by Web Service consumers (programmers). Web Service consumers can use the UDDI inquiry interface to discover these published Web Services by browsing, searching, and drilling down in the UDDI registry to select one or more Web Services from among those registered to be used in their applications for a particular enterprise process.
For example, a Web Service provider administrator working with programmers who have completed a Web Service implementation using the J2EE stack (either EJBs, javabeans, JSPs, or servlets) and exposing the implementation as a Simple Open Access Protocol (SOAP)-based Web Service, can publish the Web Service by providing all the metadata and pointers to the interface specification in the UDDI registry. In this way, the Web Service provider administrator publishes the availability of these Web Services for the Web Service consumer or programmer to discover and select for use in their own applications.
The information provided in a UDDI registration can be used to perform three types of searches:
UDDI uses standards-based technologies, such as common Internet protocols (TCP/IP and HTTP), XML, and SOAP, which is a specification for using XML in simple message-based exchanges. UDDI is a standard Web Service description format and Web Service discovery protocol; a UDDI registry can contain metadata for any type of service, with best practices already defined for those described by Web Service Description Language (WSDL).
The UDDI registry consists of the following four data structure types that group information to facilitate rapid location and understanding of registration information:
Figure 8-1 shows the UDDI information model and the relationships among its four data structure types.
Because UDDI makes use of XML and SOAP, each of these data structure types contains a number of elements and attributes that further serve to describe a business or have a technical purpose. See the UDDI Data Structure Reference V1.0 Open Draft Specification 30 September 2000 and the UDDI Programmer's API 1.0 Open Draft Specification 30 September 2000 for a complete description of the UDDI service description framework, including its XML schema, and the approximately 20 request messages and 10 response messages that comprise the request/response XML SOAP message interface that is used to perform publishing and inquiry functions against the UDDI business registry.
This section describes a subset of features that provide UDDI support for Web Services deployed in OC4J as the Oracle 9iAS release 2 UDDI enterprise implementation of OC4J Web Services and the UDDI enterprise-wide Web Services registry.
The Oracle UDDI registry support for Web Services deployed in OC4J is comprised of two parts:
Web Service provider administrators can also update published Web Services by searching, locating, and drilling-down to OC4J Web Services using the Application Server: iAS: OC4J home: Administration: Related Links: UDDI Registry link provided through OEM.
Web Services are discovered in the Oracle UDDI Registry by browsing the registry using tools or using the Inquiry API.
Programmers can create their own inquiry browse tool or use third-party tools to browse and drill down and get information about Web Services from the Oracle UDDI registry as well as from any other accessible UDDI Version 1.0 Web Service registry. Programmers can use the Inquiry API available for Java programmers to implement their own Web Service discovery interface.
The Inquiry API lets programmers search for the available registered Web Services by providing find (browse and drill down) calls and a get calls for locating and getting information in each of the four data structures shown in Figure 8-1.
The inquiry API allows programmers to discover and use Web Services using the Java language. Programs can be written in any language and use the SOAP protocol to discover Web Services. The Java API is provided as a convenience for Java programmers. The URL for the UDDI registry is http://
<ias-http-server-host-name><ias-port-number>
/uddi/inquiry
, where the <ias-http-server-host-name>
is where the Oracle HTTP Server powered by Apache is installed and the <ias-port-number>
is the port number for the Oracle HTTP Server.
The Inquiry API is located in the Oracle9iAS installation directory, <ORACLE_HOME>
/ds/uddi/
for UNIX and <ORACLE_HOME>
\ds\uddi\
for Windows.The API documentation that describes how to use this inquiry API can be found on the Oracle9iAS Documentation Library as UDDI Client API Reference (Javadoc) under Oracle9iAS Web Services, which is located under the J2EE and Internet applications tab.
A set of sample demo files are located in <ORACLE_HOME>
/ds/uddi/demo/demo.zip
for UNIX and ORACLE_HOME>
\ds\uddi\demo\demo.zip
for Windows.
Within the demo.zip
file is a Java program file, UddiInquiryExample.java
, that provides Java programmers with a starting point that demonstrates the key constructs and the sequence in using the Oracle UDDI client library.
The program example does the following:
SoapTransportLiaison transport = new OracleSoapHttpTransportLiaison();
-Dhttp.proxyHost=
<hostname>
-Dhttp.proxyPort=
<portnum>
.
setHttpProxy((SoapHttpTransportLiaison)transport);
UddiClient uddiClient = new UddiClient(szInquiryUrl, null, transport);
// Find a business with a name that starts with "T" String szBizToFind = "T"; System.out.println("\nListing businesses starting with " + szBizToFind); // Actual find business operation: // First null means no specialized FindQualifier. // Second null means no max number of entries in response. // (For example, maxRows attribute is absent.) BusinessList bl = uddiClient.findBusiness(szBizToFind, null, null); // Print the response. System.out.println("The response is: "); List listBusinessInfo = bl.getBusinessInfos().getUddiElementList(); for (int i = 0; i < listBusinessInfo.size(); i++) { BusinessInfo businessInfo = (BusinessInfo)listBusinessInfo.get(i); System.out.println(businessInfo.getName()); System.out.println(businessInfo.getFirstDescription());
UddiElementFactory uddiEltFactory = uddiClient.getUddiElementFactory();
CategoryBag cb = (CategoryBag)uddiEltFactory.createCategoryBag(); KeyedReference kr = (KeyedReference)uddiEltFactory.createKeyedReference(); kr.setTModelKey(szCategoryTModelKey); kr.setKeyValue(szCategoryKeyValue); kr.setKeyName(""); cb.addUddiElement(kr);
ServiceList serviceList = uddiClient.findService("", cb, null, new Integer(30));
XmlWriter writerXmlWriter = uddiEltFactory.createWriterXmlWriter( new PrintWriter(System.out)); serviceList.marshall(writerXmlWriter); writerXmlWriter.flush(); writerXmlWriter.close();
uddiClient.close();
Using OEM, Web Service provider administrators can publish Web Services in the Oracle UDDI registry in two ways:
The second to last step or the Publish Web Services step of the Deploy Applications Wizard lets Web Service provider administrators publish Web Services (servlets) that are found in your EAR file. Any Web Service servlet in an application that you want to access must be published to the Oracle UDDI registry to one or more desired categories within one or more of the classification taxonomies provided. Any unpublished Web Service in an application appears with the status of Not Published
and when the Web Service is published the status changes to Published
.
Web Service provider administrators can update the published Web Services they discover through the OEM Discovery tool using the UDDI Registry link in the Related Links column within the Administration section of the OC4J: home window from the Application Server: iAS: window.
The Oracle UDDI Registry uses the following three standard classification taxonomies:
This is a classification system for each industry and corresponding code. For more information about NAICS, see the Web site at: http://www.census.gov/epcd/www/naics.html
.
This is the first coding system to classify both products and services for use throughout the global marketplace. For more information about UNSPSC, see the Web site at: http://eccma.org/unspsc/
.
This a list of all country names and each corresponding two character code element. For more information about ISO3166, see the Web site at: http://www.din.de/gremien/nas/nabd/iso3166ma/
.
When you publish a Web Service, you can select the classification taxonomy and the category to which you want to register the Web Service. You have the option of publishing your Web Service to any or all three of these classification taxonomies and to as many categories and subcategories as you wish within each classification taxonomy.
To publish a Web Service using the OEM Deploy Applications Wizard, do the following:
Not Published
by clicking its corresponding radio button in the Select column, and click Publish to continue to the Web Services Details window.
After deployment, metadata describing the Web Services that you chose to publish has been added to the UDDI registry.
To publish a Web Service using the OEM Web Services Details window, do the following:
Click the UDDI Registry link.
Click the Administration link.
OEM provides a user interface for Web Service provider administrators to browse, drill down, and get information about Web Services published for categories in the Oracle UDDI registry. Web Service provider administrators can update the published Web Services they discover through the OEM Discovery tool using the UDDI Registry link within the Administration section of the OC4J: home window from the Application Server: iAS window.
To update a published Web Service using OEM to discover the Web Service, do the following:
Click the UDDI Registry link.
Click the desired classification taxonomy link.
Navigate to the desired category or sub-category by successively clicking the desired category links.
Select the corresponding radio button in the Select column for the desired category and click View Services.
To view the complete details of a particular published Web Service listed for a category, either click its service name link or select its corresponding radio button in the Select column and click View Details.
Click the desired service name link.
Service details include information such as the Web Service name, Web Service description, and the URL of the Web Service access point.
Category
Category information includes the classification taxonomy and the corresponding code value and its category name.
tModel details include information that describe the interface that the Web Service implements, such as the tModel name, tModel description, and URL to the interface specification, typically a WSDL document.
Category
Category information includes the classification taxonomy and the corresponding code value and its category name.
Category information can be added or deleted for both the Service Details and tModel Details sections. You can browse the Oracle UDDI registry (click Browse UDDI Registry) looking for categories in which to register this Web Service. You can add categories (click Add Category) to which both this Web Service and tModel are to be registered. You can remove categories (click Delete) from which this Web Service and tModel are registered.
Service and tModel detail information can be modified by moving the cursor to the appropriate field and making the necessary changes.
After you have made all your selections or completed all changes for this Web Service, click Apply to save your changes.
If you have made changes to any field and you decide you want to return to the original set of values for all selections, click Revert. The window refreshes with the original set of values for all selections as if you just began your current session again.
Make your modifications and click Apply to save your changes.
Alternatively, you can select the UDDI Registry link at the top of the Web Services Details window to return to the UDDI Registry window where you can navigate to another classification taxonomy to discover Web Services for other categories. At each desired category, select the desired Web Service to view its details, make any necessary changes, and finally click Apply to save your changes.
The UDDI specification mandates that the registry support the full UTF-8 character set. Oracle recommends, though does not require, using UTF-8 as the character set for the Oracle9iAS infrastructure database if the UDDI registry is intended to be used.
If the database is not configured with the UTF-8 character set or its equivalent or superset, there could be data corruption and error due to loss in character set conversion to or from UTF-8. Refer to Oracle9i Globalization Support Guide for details.
In particular, the descriptions in UDDI built-in taxonomy ISO-3166 contains descriptions with non-ASCII characters, such as some Western European characters and some Eastern European characters for the names of cities or regions. In order to support the non-UTF-8 database, all non-ASCII characters in the descriptions are replaced with ASCII-characters as an approximation.
If you do have an UTF-8 database, you can upgrade the built-in ISO-3166 taxonomy to the one with accurate descriptions using the following instructions:
clrISO.sql
, for example:
cd <ORACLE_HOME>/ds/uddi/admin sqlplus system/manager @clrISO.sql
iso3166-99.ctl
, for example:
cd <ORACLE_HOME>/ds/uddi/admin sqlldr userid=system/manager control=iso3166-99.ctl
|
Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|