Installing Oracle Service Registry Configuring the Oracle Registry Repository Exchange Utility Configuration File

10-4 Oracle Fusion Middleware Configuration Guide for Oracle Enterprise Repository

10.2.1 Installing and Configuring the Oracle Registry Repository Exchange Utility

Before you can use the Oracle Registry Repository Exchange Utility to publish and receive Oracle Enterprise Repository metadata to and from Oracle Service Registry, you must complete the following configuration steps: ■ Section 10.2.1.1, Install the Oracle Registry Repository Exchange Utility ■ Section 10.2.1.2, Configure Using the Asset Type Name

10.2.1.1 Install the Oracle Registry Repository Exchange Utility

When Oracle Enterprise Repository is installed, by default, the Oracle Registry Repository Exchange Utility files are found at Oracle_HOME\repositoryXXX\core\tools\solutions The Oracle Registry Repository Exchange Utility files for Oracle Enterprise Repository 11g are as follows: ■ 11.1.1.x.x-RR-ExchangeUtility.zip : Contains the package for the Exchange Utility. You can unzip the 11.1.1.x.x-RR-ExchangeUtility.zip file into the directory on your file system where Oracle Enterprise Repository is installed, typically Oracle_ HOME\repositoryXXX. When the zip file containing the Oracle Registry Repository Exchange Utility is unzipped to your file system, it creates the following structure. orrxu ExchangeUtility Tool Home | lib Within the ExchangeUtility Tool Home directory, you will find the Oracle Registry Repository Exchange Utility files, such as the orrxu.xml, UDDIMappings.xml, orrxu.properties, orrxu.bat, and encrypt.bat files.

10.2.1.2 Configure Using the Asset Type Name

When a solutions pack is imported to a system that has existing Asset Types with different UUIDs than the pack, then those Asset Types are created and versioned. The orrxu.properties file specifies asset types by name, which causes results to be inaccurate. This is because it tries to use the asset types that already existed, and not the ones that were included in the new solutions pack. In previous versions of Oracle Enterprise Repository, some Asset Types were not created by the solutions pack, but rather manually, which generated a random UUID. If you have an existing asset with the same name as the datapack, then the work around is to rename the asset in their system, before they import the new datapack.

10.2.2 Installing Oracle Service Registry

You can install Oracle Service Registry and acquire the UDDI Inquiry URL such as http:host:portregistryuddiinquiry. For more information about installing Oracle Service Registry, see http:download.oracle.comotndocstechsoaOSR11gR1ProductDocumentation.pdf.

10.2.3 Configuring the Oracle Registry Repository Exchange Utility Configuration File

This section describes how to configure the Oracle Registry Repository Exchange Utility configuration file for your environment. It contains the following topics: Configuring Oracle Enterprise Repository to Exchange Metadata with the Oracle Service Registry 10-5 ■ Section 10.2.3.1, Setting the Repository Connection Information ■ Section 10.2.3.2, Setting the Registry Connection Information ■ Section 10.2.3.3, Setting the Repository Query ■ Section 10.2.3.4, Setting the Destination Registries ■ Section 10.2.3.5, Setting the Registry Query ■ Section 10.2.3.6, Setting the Source Registry

10.2.3.1 Setting the Repository Connection Information

Open the orrxu.xml file located at ExchangeUtility Tool Home and modify the following XML section so that it points to your Oracle Enterprise Repository instance with the appropriate credentials. repository urihttp:localhost:7101oeruri credentials useradminuser passwordpassword To ensure security, the password must be encrypted. The password encryption tool encrypt.batencrypt.sh, which is located in Oracle_homerepositoryXXXcoretoolssolutions11.1.1.x.x-OER-PasswordTools.zip, allows you to encrypt the passwords that are stored in the Oracle Registry Repository Exchange Utility configuration orrxu.xml file. credentials repository where URI = Oracle Enterprise Repository URI, using the following format: http:host:portOracle Enterprise Repository web app name For more information about encrypting passwords, see Chapter 5, Password Encryption .

10.2.3.2 Setting the Registry Connection Information

The Oracle Registry Repository Exchange Utility can publish to one or more registries and can read from multiple registries it requires separate transactions to read from each registry. The first step is to create one or more registry nodes with the connection info, as shown below: registries registry name=osr inquiryURIhttp:localhost:7001registryuddiinquiryinquiryURI publishURIhttp:localhost:7001registryuddipublishingpublishURI securityURIhttp:localhost:7001registryuddisecuritysecurityURI credentials useradminuser passwordpassword To ensure security, the password must be encrypted. The password encryption tool encrypt.batencrypt.sh, which is located in Oracle_homerepositoryXXXcoretoolssolutions11.1.1.x.x-OER-PasswordTools.zip, Note: It is recommended that you run the Exchange Utility as a user with the Basic Access Settings for Assets - View, Edit, Accept, and Register. 10-6 Oracle Fusion Middleware Configuration Guide for Oracle Enterprise Repository allows you to encrypt the passwords that are stored in the Oracle Registry Repository Exchange Utility configuration orrxu.xml file. credentials registry registry name=osr2 inquiryURIhttp:localhost:7201registryuddiinquiryinquiryURI publishURIhttp:localhost:7201registryuddipublishingpublishURI securityURIhttp:localhost:7201registryuddisecuritysecurityURI credentials useradminuser passwordpassword To ensure security, the password must be encrypted. The password encryption tool encrypt.batencrypt.sh, which is located in Oracle_homerepositoryXXXcoretoolssolutions11.1.1.x.x-OER-PasswordTools.zip, allows you to encrypt the passwords that are stored in the Oracle Registry Repository Exchange Utility configuration orrxu.xml file. credentials registry registries

10.2.3.3 Setting the Repository Query

The following configuration snippets demonstrate how to build a query to run against Oracle Enterprise Repository and receive the list of services that should be published to Oracle Service Registry. This filters the services to be pushed to Oracle Service Registry in the form of a query. There are a number of ways that services can be queried and you can create one or more queries. Some of the ways that services can be queried are: ■ Section 10.2.3.3.1, Query by Name ■ Section 10.2.3.3.2, Query by Registration Status ■ Section 10.2.3.3.3, Query by Categorizations ■ Section 10.2.3.3.4, Query by Filters

10.2.3.3.1 Query by Name When the services element is configured, the service

name specified is published to Oracle Service Registry. However, due to a limitation in the Oracle Enterprise Repository REX API, only one services element can be added. query repositoryQuery services service name=HelloWorld services registrationStatusregistrationStatus serviceCategorizations type=AssetLifecycleStage value=

10.2.3.3.2 Query by Registration Status When the registrationStatus element is

configured, only the services with the specified Registration Status are published. For example, if this field is set to Registered, then only registered services are published to Oracle Service Registry, while ignoring all other matched services that are not in this state. registrationStatusRegisteredregistrationStatus Configuring Oracle Enterprise Repository to Exchange Metadata with the Oracle Service Registry 10-7 The acceptable values for registration status, which are not case sensitive, are as follows: ■ registered ■ rejected ■ under_review ■ pending_review ■ submitted ■ unsubmitted ■ undefined

10.2.3.3.3 Query by Categorizations When the serviceCategorizations element

is configured, only the services with the specified categorization is published. For example, when using the following categorization, only the Recommended services are published to Oracle Service Registry. serviceCategorizations type=AssetLifecycleStage value=Stage 4 - Release

10.2.3.3.4 Query by Filters You may want to limit the kinds of services that are

promoted to a UDDI registry from Oracle Enterprise Repository. The Filters element further narrows the selection based on the type of service besides registration status, service categorizations, and endpoint asset lifecycle. When configured, services that meet the specified criteria are the only services published. Each filter element has three attributes: type, exclude, and value. ■ Type required field: There are two types of filters: metadata and wsdllocation. – metadata : In Oracle Enterprise Repository, a service asset has several types of metadata. This data can be filtered based on the metadata type name and the xpath for the field. An example is Service Type. This is a piece of metadata applied to all services created by the Harvester. The metadata type is internal.introspector and the xpath for the field is syncService_Type. The format for the filter is as follows prefixed by metadata.: filter type=metadata.internal.introspector.storesyncService_ Type value=Proxy Service – wsdllocation : When harvesting services into Oracle Enterprise Repository, the WSDL location can be stored either on a remote server or as a local file information in Oracle Enterprise Repository. ■ Value required field: Each type has its own set of possible values. This value is what is used to determine which services to filter on. – metadata values : Accepted values depend on the metadata type being filtered. For example: Note: When a service with a local file information is published, information on that WSDL will not be added to Oracle Service Registry, only metadata of the service. 10-8 Oracle Fusion Middleware Configuration Guide for Oracle Enterprise Repository Service_Type : Proxy Service or Split-Join Service filter type=metadata.internal.introspector.storesyncService_ Type value=Proxy Service Scope : global or local filter type=metadata.internal.introspector.storesyncScope value=global Local indicates services that are not consumable. Deployment_Status : run-time or design-time filter type=metadata.internal.introspector.storesyncDeployment_Status value=run-time – wsdllocation values : remote, local. The following will publish services with a remote WSDL. filter type=wsdllocation value=remote ■ Exclude optional field: The exclude flag, if set to the value of true, publishes all services except those that match the criteria in the filter. The following publishes all services except those with a WSDL stored in a local file information. filter exclude=true type=wsdllocation value=local If the Exclude flag is set, then there can be multiple filters of the same type. This means that a search can be performed where a service is of the type Business Service or Split-Join Service. However, if the Exclude flag is not set, then multiple filters of the same type will not work, meaning a search cannot be performed where a service is of the type Business Service and Split-Join Service. You can only combine multiple FILTER criteria when you are excluding the criteria from the search results. The EXCLUDE Business Service and the EXCLUDE proxy service will work. However, the INCLUDE business service and the INCLUDE proxy service will not work. For example, filter type=metadata.internal.introspector.storesyncService_Type value=Business Service or filter exclude=true type=metadata.internal.introspector.storesyncService_ Type value=Business Service filter exclude=true type=metadata.internal.introspector.storesyncService_ Type value=Proxy Service The following example will not work: filter type=metadata.internal.introspector.storesyncService_Type value=Business Service filter type=metadata.internal.introspector.storesyncService_Type value=Proxy Service Example 1 The following example is the default configuration for Exchange Utility. It publishes services that are not of the service type Proxy Service from Oracle Service Bus and only services that have remote WSDLs. Configuring Oracle Enterprise Repository to Exchange Metadata with the Oracle Service Registry 10-9 repositoryQuery services service name= services --Search criteria for the registration status of the service in Oracle Enterprise Repository -- registrationStatusregistrationStatus --Search criteria for a categorization assigned to the service in Oracle Enterprise Repository -- serviceCategorizations type=AssetLifecycleStage value= --Name of UDDI Registries to publish to. This name corresponds with UDDI Registry definitions -- --below under the registries section -- destinationRegistries destinationRegistry name=TEST_UDDI endpointAssetLifecycleStatusendpointAssetLifecycleStatus destinationRegistry destinationRegistries --Filter: identify metadata to apply filter on services to publish-- filters filter type=wsdllocation value=remote filter type=metadata.internal.introspector.storesyncScope value=global filter exclude=true type=metadata.internal.introspector.storesyncService_Type value=Proxy Service filters repositoryQuery Example 2 The following will publish services with both remote and locally stored WSDLs and only services of the type Proxy Service. filters filter type=metadata.internal.introspector.storesyncService_Type value=Proxy Service filters Example 3 The following publishes only Web services and exclude Business, Proxy, and Split-Join services: filters filter type=metadata.internal.introspector.storesyncService_Type value=Web Service filters

10.2.3.4 Setting the Destination Registries

The following configuration snippet demonstrates how to use the destinationRegistries element to configure one or more destination registries where the matched Oracle Enterprise Repository Services will go. Each destination registry may contain an endpointAssetLifecycleStatus property. This serves to filter service endpoints of a certain Asset Lifecycle Stage Categorization type to be published to that registry, which means only endpoints that possess the given Asset 10-10 Oracle Fusion Middleware Configuration Guide for Oracle Enterprise Repository Lifecycle Stage Categorization are published to the registry that is defined as such. The endpointAssetLifecycleStatus property is an optional property. These registries are used when services are picked from Oracle Enterprise Repository and are moved to Oracle Service Registry for example, Oracle Enterprise Repository Oracle Service Registry. services service name= services destinationRegistries destinationRegistry name=DEV endpointAssetLifecycleStatusStage3- BuildendpointAssetLifecycleStatus destinationRegistry destinationRegistry name=PROD endpointAssetLifecycleStatusStage4-ReleaseendpointAssetLifecycleStatus destinationRegistry destinationRegistries Modify the destination registries and add the endpointLifecycleStatus element to them.

10.2.3.5 Setting the Registry Query

The following configuration snippet demonstrates how to use the registryQuery element to build a query to run against Oracle Service Registry and receive the list of services that need to be fetched from Oracle Service Registry and placed in Oracle Enterprise Repository. registryQuery businessEntities businessEntity name=Account Services businessEntities services service name=AddCustomerService services qualifiers qualifierapproximateMatchqualifier qualifiers sourceRegistryosrsourceRegistry registryQuery Follow these configuration guidelines: ■ Ensure that the businessEntities name or service name value is not empty. ■ For the businessEntities name, the exact name must be specified. ■ For the service name, at least one wildcard character should be used. For example, to get all services specify . ■ Search criteria for an Oracle Service Registry query is case-sensitive. Services can be searched in the following ways: ■ Search by one or more Service names. The Service names can be a wildcard if the qualifier is approximate. For example, if the service name is Google, any service that starts with Google is fetched and placed in Oracle Enterprise Repository. ■ Select one or more Business Entity and all the services in those Business Entities are fetched and placed in Oracle Enterprise Repository. The Business Entity name Configuring Oracle Enterprise Repository to Exchange Metadata with the Oracle Service Registry 10-11 has to be exact, the wild card is supported only for Services and not for Business Entities.

10.2.3.6 Setting the Source Registry

The sourceRegistry element tells the registry where the Services are picked and placed in Oracle Enterprise Repository. This registry is used when Services are picked from Oracle Service Registry and they move to Oracle Enterprise Repository for example, Oracle Service Registry Oracle Enterprise Repository. sourceRegistryosrsourceRegistry

10.2.4 Configuring Oracle Enterprise Repository Categorizations in the UDDI Mappings File