The previous sample code on publishing is provided for illustration purposes, but does not comprise a full, working example.
SAP Sybase Event Stream Processor ships with fully functioning examples you can use as a starting point for your own projects. Examples for publishing are located in:
%ESP_HOME%\examples\java\com\sybase\esp\sdk\examples (Windows)
$ESP_HOME/examples/java/com/sybase/esp/sdk/examples (Linux and Solaris)