There are two types of two lead sockets. One is set up to have a diode attached to be used as a switched lamp, and the barrel of the socket is grounded to the mounting leg. Power goes to the middle led and the mounting leg. This is NOT the one you want. The other has the barrel insulated from the mounting leg and is powered by connecting wires to each lead. Again, use a 6v lantern battery to see which one you have.
Hope this helps!
Ian