We determine a finite set of representatives of the set of local solutions in a maximal lattice modulo the stabilizer of the lattice in question for a quadratic Diophantine equation. Our study is based on the works of Shimura on quadratic forms, especially [AQC] and [IQD]. Indeed, as an application of the result, we present a criterion (in both global and local cases) of the maximality of the lattice of (11.6a) in [AQC]. This gives an answer to the question (11.6a). As one more global application, we investigate primitive solutions contained in a maximal lattice for the sums of squares on each vector space of dimension 4, 6, 8, or 10 over the field of rational numbers.