Configuring and Using Automated Harvesting in Design-time and Runtime Environments 6-5
New asset types in the import bundle are added to Oracle Enterprise Repository.
– Relationship Types
Relationship Types, which have the same name and direction, are replaced in Oracle Enterprise Repository with the information in the import bundle.
– Categorization Types
Categorization Types, which have the same name but new categorization entries, are added to the categorization type in Oracle Enterprise Repository
with the information in the import bundle.
New Categorization Types are added to Oracle Enterprise Repository.
– Acceptable Value Lists AVLs
AVLs, which have the same name but new values, are added to the AVL in the Oracle Enterprise Repository with the information in the import bundle.
New AVLs are added to Oracle Enterprise Repository.
– CMF Metadata Entry types
Duplicate Metadata Entry types same UUID are ignored. New Metadata Entry Types are added to Oracle Enterprise Repository.
– CMF Metadata Entries
Duplicate Metadata Entries same UUID are ignored. New Metadata Entries are added to Oracle Enterprise Repository.
For more information about parameter.properties, see The parameter.properties File section in the Oracle Fusion Middleware Users Guide for Oracle Enterprise
Repository.
6.2.2 Configuring the Harvester for the Command Line
You can configure the Harvester from the command-line. Organizations can easily bootstrap their Enterprise Repository using the Harvester from the command-line.
Command-line harvesting allows organizations to harvest:
■
individual files
■
directories of files
■
remote files
■
files residing in artifact stores
■
files residing on Oracle MetaData Store MDS This section describes the tasks you need to perform to configure the Harvester for the
command-line:
■
Section 6.2.2.1, Setting Repository Connection Information for the Command Line
■
Section 6.2.2.2, Selecting the Artifacts to Harvest for the Command Line
6-6 Oracle Fusion Middleware Configuration Guide for Oracle Enterprise Repository
6.2.2.1 Setting Repository Connection Information for the Command Line
Open the XML file HarvesterSettings.xml located at Harvester Home and modify the following XML to point the Harvester to an Oracle Enterprise Repository
instance with the correct credentials:
repository urihttp:localhost:7101oeruri
credentials usersmithuser
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 Harvester configuration
HarvesterSettings.xml file. credentials
timeout30000timeout repository
Alternatively, the repository connection information can also be passed as parameters to the command line utility as follows:
C:\test\harvester harvest -url http:localhost:7101oer -user admin -password password -file c:\test\samples
6.2.2.2 Selecting the Artifacts to Harvest for the Command Line
The Harvester can be run from the command line using the harvest.bat utility. Before running harvest.bat or harvest.sh, ensure that the environment variables
mentioned in Table 6–3
are set. In Windows, from a command window, you can type set X to see the value of the variable X, and set X=abc to set the value of X to abc.
Table 6–4 shows the options that can be specified using the Harvester command line
utility:
Note: It is recommended that you run the Harvester as a user with
the Basic Access Settings for Assets - View, Edit, Accept, and Register.
Table 6–3 Command Line Script
Environment Variable Description
JAVA_HOME Ensure that the JAVA_HOME environment variable points to an installed java runtime
JRE or SDK. For Oracle Service Bus instrospection, this must be Java version 6 or higher.
BEA_HOME Ensure that the BEA_HOME environment variable points to the installation directory
containing Oracle Service Bus server, only if you plan to harvest projects from Oracle Service Bus. For example, C:\bea.
JAVA_OPTS Optionally, set your JAVA_OPTS parameter to add any additional java parameters
that are necessary. For example, if you need to use an HTTP proxy server, set the value to -Dhttp.proxyHost=www-proxy.yourhost.com -Dhttp.nonProxyHosts=
.yourhost.com |localhost
See Also: http:java.sun.comjavase6docstechnotesguidesnetproxies.html
Configuring and Using Automated Harvesting in Design-time and Runtime Environments 6-7 Table 6–4
Command Line Options for the Harvester Harvester Options
Description
-settingsfile Specifies the configuration settings XML file.
-mds_settings file Specifies the location of an adf-config.xml file to initialize MDS. If omitted, defaults to the adf-config.xml file that comes with Harvester.
-url URL Specifies the URL of Oracle Enterprise Repository.
-user OER User Name
Specifies the user name of the Oracle Enterprise Repository user. -password OER
Password Specifies the password of the Oracle Enterprise Repository user.
To ensure security, the password must be encrypted. The Oracle Enterprise Repository Web console has a tool to encrypt passwords:
http:host:portdomaindiagencryptstrings.jsp See Also: For more information about password encryption, see
Chapter 5, Password Encryption
. -artifact_store
Specifies the name of Oracle Enterprise Repository artifact store to look in. The artifact store must be created beforehand in the Oracle Enterprise Repository Asset
Editor. If specified, the -file argument is resolved relative to the artifact store URL. When specifying a URI relative to an Artifact Store, the URI must resolve to a file such
as a .wsdl or .zip file. The URIs that point to directories are not supported. For more information about artifact stores, see
Section 6.2.4.2, Specifying Parameters as Nested Elements
. -file filename or
URL Specifies the file or directory to be harvested. This can be a filename or URL to the
file. -file_type type
Specifies the file type of the file to be harvested. If not specified, then the type is derived from the file extension. This must correspond to one of the filetypes in the
configplugins folder. By default, the following are supported: .bpel, .mfl, .policy, .wsdl, .xsd, .xquery, .xslt.
-remote_url URL Specifies the running server from which to harvest the remote project, instead of from
a file. -remote_username
username Specifies the username to connect to the remote server.
-remote_password password
Specifies the password to connect to the remote server. To ensure security, the password must be encrypted.
The Oracle Enterprise Repository Web console has a tool to encrypt passwords: http:host:portdomaindiagencryptstrings.jsp
-remote_server_type type
Specifies the type of remote server. Remote server could include either of the following: SOASuite, OSB, WLS.
-remote_project type
Specifies the name of remote project to harvest, instead of a file. If omitted, all of the projects on the server are harvested. In the case of Oracle SOA Suite, this should be
the name of the composite plus revision, for example, MyComposite_rev1. In the case of WLS, this should be the Application Name, as seen in the WebLogic
Administration console and Enterprise Manager.
-deployment_status status
Specifies the deployment status that is set on the created assets. It takes either design-time or run-time value.
-version Specifies the print version information.
6-8 Oracle Fusion Middleware Configuration Guide for Oracle Enterprise Repository
An example of a remote harvest is as follows: harvest.bat -remote_url mysoasuiteserver:8001 -remote_username
weblogic -remote_password -remote_server_type SOASuite -remote_project MyComposite_rev1.0 -soa_partition department1
To ensure security, the password must be encrypted. The Oracle Enterprise Repository Web console has a tool to encrypt passwords:
http:host:portdomaindiagencryptstrings.jsp Figure 6–1
shows the command line utility options and online help displayed by the harvest.bat -help command.
Figure 6–1 Harvest Command Line Utility Options
None of the command line options are required. They can be omitted. If the options are omitted, then the Harvester uses the information in the
HarvesterSettings.xml file in the Harvester Home directory, where -soa_partition
type Specifies the name of partition for Oracle SOA Suite and by default, it uses the soa
default partition. -preview
Specifies if the harvest can be run on a preview mode. If set to true, then runs harvester in preview mode. A detailed information about successes and failures are
logged, and no changes are committed to Oracle Enterprise Repository. If set to false or no value is specified, then runs harvester in production mode. A
detailed information about successes and failures are logged, and the changes are committed to Oracle Enterprise Repository.
-help Displays the online help for the Harvester command line utility.
Table 6–4 Cont. Command Line Options for the Harvester
Harvester Options Description
Configuring and Using Automated Harvesting in Design-time and Runtime Environments 6-9
harvest.bat resides. If options are specified on the command line, then these override the settings in HarvesterSettings.xml.
To point to the artifacts to be harvested using the HarvesterSettings.xml file in the Harvester Home, modify the following XML:
query fileQuery
rootDirC:\samplesrootDir filesBPELfiles
fileQuery query
or query
fileQuery fileshttp:remoteservermy_generated_wsdlfiles
fileType.wsdlfileType fileQuery
query
6.2.3 Using Harvester within an Integrated Development Environment