to publish something over an arbitrary overlay you should register an application on top of the overlay. For the example gnutella you can use the GnutellaApplication (as it is done in example configs) or the FilesharingApplication2. These applications offer easy to use methods (with only a few parameters) and initiate publish or lookup methods with correct parameters in the underlying overlay.
A good example could be found in the current version of the simulator in the config “config/visualization/gnutella04_bitmap.xml”.
I hope I could help you.