1. On the server side, expose a WMS service.
2. On the client side, Define a Marker Layer in the OpenLayers layer stack
3. Send request=GetFeatureInfo to the WMS on the Marker Layer.
4. Create a new marker according to the mouse click and add this feature to the Marker layer.
5. Parse the returning in the response.responseText from the server and display the attributes.