Oracle9i Application Server Wireless Edition Configuration Guide Release 1.1 Part Number A86701_02 |
|
Utilities describes the XML utilities used for management and deployment. Each section of this document presents a different topic. These sections include:
The Wireless Edition database password for the repository is stored in clear text in the System.properties file by default. The password can be encrypted by running the following tool to modify the db.connect.string:
encryptPassword.sh WE_HOME/server/classes/oracle/panama/core/admin
Then set the following property in the System.properties file:
passwordEncrypted=true
The SystemPasswordEncryptionHook.class identifies the encryption algorithm. To provide extensibility, the class can be used to invoke a user's algorithm in place of the default algorithm.
The default setting is:
locator.SystemPasswordEncryptionHook.class= oracle.panama.rt.common.SystemPasswordEncryption
To use an alternate encryption algorithm, implement the following interface:
public interface SystemPasswordEncryptionHook { /** Encrypts the text * @param text the text to be encrypted * @return the encrypted text */ public String encrypt(String text); /** Decrypts the encrypted text * @param encryptedText the encrypted text * @return the decrypted text */ public String decrypt(String encryptedText); }
This allows you to replace the default algorithm, for example:
locator.SystemPasswordEncryptionHook.class= oracle.panama.MyEncryption
The LoadXML
utility allows you to download and upload Wireless Edition repository objects as XML files.
LoadXml
reads from stdin
and writes to stdout
. All logging and error messages are written to stderr
. The XML in the file you import with LoadXml
must conform to the Repository XML.
The upload function performs the following:
LoadXml
updates the objects.
LoadXml
creates them.
In the unload XML result, all objects have an attribute called _objectId
; this is the system unique object key. You must look up objects by unique name attribute and not the object key. If you start the program without giving an option, all options are listed.
LoadXML
imports and exports the repository identified by the database connect string in the System.properties file. In the development environment, this file is located in the WE_HOME/server/classes/oracle/panama/core/admin directory.
Wireless Edition does not validate the XML file you import into the repository with LoadXml
. To avoid errors, work in an XML file that you have exported from the repository. This gives you a "known good" Repository XML framework for adding, removing, and modifying individual elements.
oracle.panama.core.util.LoadXml [-l username/password] [-x[adgnstu] [expr]] [-c# [-p]] [-r rmi://rmi-host:port/server_name]
The LoadXml
utility accepts the following options:
In this example, XML data is written to standard output.
java oracle.panama.core.util.LoadXml -l adm/adm -x > outputfile.xml
In this example, XML data is read from standard input. It must contain all referenced objects.
prompt$ java oracle.panama.core.util.LoadXml -l adm/adm -c0 < inputfile.xml
You can use the upload
and download
utilities to import and export the Wireless Edition repository as an XML file. These utilities invoke LoadXml
. They are located in the WE_HOME/sample directory of your development environment. You invoke upload
from a command prompt as follows:
upload.bat repository.xml
This loads the contents of the file repository.xml into the repository. It accesses the repository specified by the connect string in the client-side System.properties file.
To download
a repository:
download.bat repository.xml
This places the contents of the repository in a file named repository.xml.
Note: Please make sure the -l option has been properly specified in either the upload.bat or upload.sh script file. |
The xmlloader.properties file specifies the mapping between the object names and their handler Java classes. The objects are specified as fully-qualified from the root, as dot-separated names. For example, the PanamaObjects
property file is specified as oracle.panama.util.XMLLoader.PGRPHandler.
The System.properties file has the following entries to determine behavior.
Table 8-2 Behaviors for the XML Loader in the Systems.property File
Note: 'All the XML Loader parameters in the System.properties file are default values that are overwritten by the XML Loader API. |
The Xslt
utility is a tool you can use to test stylesheets. Xslt
uses the XML DOM parser and the XSL processor included with the Oracle XML processor. You can use Xslt
to apply the stylesheets you create to any XML document.
Xslt
, which is a command-line utility, reads from standard input and writes its results to standard output.
oracle.panama.util.Xslt [stylesheet]
The Xslt
utility takes the following option:
Option | Description |
---|---|
|
The XSL stylesheet that the utility applies to the XML document. |
java oracle.panama.util.Xslt mystylesheet.xsl < myxml.xml
The CopyObjects
utility allows you to copy services from one Wireless Edition site to one or more other sites. You can use this utility, for example, to deploy services from a testing and development environment to production servers.
CopyObjects
sends services to target servers as XML elements. It takes a folder object as a command-line argument. To copy a service, therefore, you must first place the service in a folder. When invoked, CopyObjects
copies the folder and all its contents to the target Wireless Edition sites you specify at the command line.
All source and target Wireless Edition servers must have the Wireless Edition RMI server running.
The basic configuration of adapters and transformers must be the same on the source and target servers. CopyObjects
only sends services, links, and folders. It does not send configuration data.
oracle.panama.core.util.CopyObjects [-f
folder] [-s
source][
targets...]
The CopyObjects
utility takes the following options:
This example copies a folder and its content from a local server to production sites at m1
and m2
.
java oracle.panama.core.util.CopyObjects \ -f /master/finance \ -s user/pw@//:2008/WEServer \ user/pw@//m1:2008/WEServer \ user/pw@//m2:2008/WEServer
|
Copyright © 2001 Oracle Corporation. All Rights Reserved. |
|