rGO–CdS–H2W12 nanocomposite film was successfully fabricated by a layer-by-layer self-assembly method. The film showed good photo-electrical response under irradiation of solar light.