  The 1%-accurate calculations of the van der Waals interaction between an atom
and a cavity wall are performed in the separation region from 3 nm to 150 nm.
The cases of metastable He${}^{\ast}$ and Na atoms near the metal,
semiconductor or dielectric walls are considered. Different approximations to
the description of wall material and atomic dynamic polarizability are
carefully compared. The smooth transition to the Casimir-Polder interaction is
verified. It is shown that to obtain accurate results for the atom-wall van der
Waals interaction at shortest separations with an error less than 1% one should
use the complete optical tabulated data for the complex refraction index of the
wall material and the accurate dynamic polarizability of an atom. The obtained
results may be useful for the theoretical interpretation of recent experiments
on quantum reflection and Bose-Einstein condensation of ultracold atoms on or
near surfaces of different nature.
