Example of a WMS layer and a vector layer, both configured to provide feature information on click.
See the getfeatureinfo.js source to see how this is done.