XPathXmlStreamReader parses a single row of data from a single XML input file and sends
the row to the ESP project. Then, the
streamingsubscribe.sh (Linux, Solaris)
or streamingsubscribebat (Windows) file reads
the row and displays it in the console.
Prerequisites
Create a cluster database and deploy a cluster to it. See
SAP Event Stream Processor: Configuration and Administration Guide for more
information.
Set JAVA_HOME:
- On Linux or Solaris, export
JAVA_HOME=$STREAMING_HOME/lib/jre
- On Windows, set
JAVA_HOME=%STREAMING_HOME%\lib\jre
Procedure
- 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 the desired user name/password combination.
- If SSL is enabled, set
ADAPTER_EXAMPLE_CLUSTER_NODE_PROTOCOL to esps. If it is
disabled, set it to esp.
|
UNIX |
- Edit the set_example_env.sh script
- Set the ADAPTER_EXAMPLE_USERNAME and ADAPTER_EXAMPLE_PASSWORD
variables to the desired user name/password combination.
- If SSL is enabled, set
ADAPTER_EXAMPLE_CLUSTER_NODE_PROTOCOL to esps. If it is
disabled, set it to esp.
|
- On Windows only, modify the set_example_env.bat
file:
- Remove the
line:
call "%~dp0..\..\..\set_adapter_env.bat"
- Add the
lines:
call set_example_env.bat
call %ADAPTER_EXAMPLE_DEPTH%\set_adapter_env.bat
- In the XPathXmlStreamReader.props file, append the desired user name and
password 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 ./streamingsubscribe.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 streamingsubscribe.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.