XPathXmlStreamReader parses a single row of data from a single XML
input file and sends the row to the ESP project. Then, the
esp-subscribe.sh (Linux, Solaris) or
esp-subscribe.bat (Windows) file reads the row and displays it in
the console.
Prerequisites
Set JAVA_HOME:
- On Linux or Solaris, export JAVA_HOME=$ESP_HOME/lib/jre
- On Windows, set JAVA_HOME=%ESP_HOME%\lib\jre
Task- Set the user name and password in the example
environment:
Operating System |
Step |
Windows |
- Edit the set_example_env.bat script
- Set the ADAPTER_EXAMPLE_USERNAME and ADAPTER_EXAMPLE_PASSWORD
variables to sybase.
|
UNIX |
- Edit the set_example_env.sh script
- Set the ADAPTER_EXAMPLE_USERNAME and ADAPTER_EXAMPLE_PASSWORD
variables to sybase.
|
- On Windows only, modify the set_example_env.bat
file:
- In the XPathXmlStreamReader.props file, append
sybase to the following lines to set the user and
password variables:
adapter.ASAPSINK.User =
adapter.ASAPSINK.Passwd =
- Run the example:
Operating System |
Step |
UNIX |
- Open a terminal window and run
./start_server_cluster.sh to start
the server cluster.
- In a second terminal window, run
./start_project.sh to start the
project.
- In the same terminal window, run
./esp-subscribe.sh to subscribe to
the project running on the cluster.
- In a third terminal window, run
./XPathXmlStreamReader.sh to start
the FilePollSource (with XPathXmlStreamReader) and AsapSink
components.
|
Windows |
- Open a command window and run
start_server_cluster.bat to start the
server cluster.
- In a second command window run
start_project.bat to start the
project.
- In the same command window, run
esp-subscribe.bat to subscribe to the
project running on the cluster.
- In a third command window, run
XPathXmlStreamReader.bat to start the
FilePollSource (with XPathXmlStreamReader) and AsapSink
components.
|
The example runs and the output displays in the second terminal/command
window.