I have noticed the techniques for photographing coins translate very well to guns and there are ample resources available on the subject online.

I personally use a lamp (soft white bulbs seem to be the best) to highlight the object, with natural light in the room ideally, a solid blanket for a background and a digital camera. I wouldn't call my results impressive but they have been satisfactory for Gunbroker.