WebSphere brand IBM WebSphere Sensor Events, Version 6.2

Exporting the XML configuration file using a command line

This topic describes how to use a command line utility to export the XML configuration file that configures the server.

About this task

There are two versions of the XML export tool. One version is integrated with WebSphere® Sensor Events, and the other is a stand-alone version that can be used to export the configuration of another server, such as the configuration of a WebSphere Premises Server 6.1.0.1 server.

Both versions of the utility come installed in the IBM_RFID_HOME\premises\tools\xmlexport directory.

Using the integrated tool

About this task

The XML that results from the integrated export tool is built by the target WebSphere Sensor Events server. This means that if you choose an output path of C:\test.xml or /root/test.xml, the XML file is generated on the target server. If you want to save the XML file to the host server, the one that is running the export script, be sure to specify a valid network path for the target server. This means that the target server must have the host server mapped or mounted in order for it to be able to write the resulting XML file back to that host server.

Also be sure that when you specify the output path for the XML file, the address should be in the correct format for the target WebSphere Sensor Events server. For example, if you run the script on a server with a Linux® operating system and the target server has a Windows® operating system, then the output path should be in a format like this: C:\\test.xml

The following parameters are defined for the integrated version of the utility:

target_hostname
The host name of the target WebSphere Sensor Events server. This argument is required.
port
The port for the target WebSphere Sensor Events server. This argument is required.
xml_output_file
This is the fully qualified path of the XML file to be created. This argument is required. The directory for the file must already exist. If the file does not exist, it will be created. If the file already exists, it will be overwritten.
log_output_file
This is the fully qualified path of the file used to log messages. This argument is optional. If the file does not exist, it will be created. If specified, new messages will be appended to the file. If not specified, messages will be written to standard out. You can specify console to write to standard out as well.

The arguments must be passed in this order: target_hostname port xml_output_file log_output_file

Procedure
  1. Change directory to: IBM_RFID_HOME\premises\tools\xmlexport
  2. Open a command prompt.
  3. Run the following command:
    • Windows xmlexport.bat target_hostname port xml_output_file log_output_file
    • Linux xmlexport.sh target_hostname port xml_output_file log_output_file

Using the stand-alone tool

About this task

This version of the export utility can be used from a WebSphere Premises Server 6.1.0.1 server or from a WebSphere Sensor Events server against a local or remote server. If the target server is a WebSphere Sensor Events server, use the integrated version of the utility.

You can edit the xmlexport6101 script if you are using non-default installation paths.

The following parameters are defined for the stand-alone version of the utility:

db_type
The type of database to connect to, db2 or oracle. This argument is required.
db_name
The name of the database to connect to. This argument is required.
db_user
The name of the database user. This argument is required.
db_password
The password for the database user. This argument is required.
target_hostname
The host name of the target database. This argument is required.
xml_output_file
This is the fully qualified path of the XML file to be created. This argument is required. The directory for the file must already exist. If the file does not exist, it will be created. If the file already exists, it will be overwritten.
log_output_file
This is the fully qualified path of the file used to log messages. This argument is optional. If the file does not exist, it will be created. If specified, new messages will be appended to the file. If not specified, messages will be written to standard out. You can specify console to write to standard out as well.

The arguments must be passed in the order: db_type db_name db_user db_password target_hostname xml_output_file log_output_file

Procedure
  1. If you are going to run the utility from a WebSphere Premises Server 6.1.0.1 server, copy these files to that server from the IBM_RFID_HOME\premises\tools\xmlexport directory on your WebSphere Sensor Events server.
    • XMLexportSA.jar
    • xmlexport6101.bat or xmlexport6101.sh, depending on your platform
  2. Change directory to where the files are located.
  3. Open a command prompt.
  4. Run the following command:
    • Windows xmlexport6101.bat db_type db_name db_user db_password target_hostname xml_output_file log_output_file
    • Linux xmlexport6101.sh db_type db_name db_user db_password target_hostname xml_output_file log_output_file
    For example:
    xmlexport6101.bat db2 IBMRFID db2admin password localhost C:\out.xml C:\log.log

Library | Support | Terms of use

(c) Copyright IBM Corporation 2004, 2009. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.