We investigate the structure and thermodynamics of inhomogeneous polymer solutions in the framework of a coarse-grained off-lattice model. Properties of the liquidvapor interface and the packing of the solution in contact with an attractive wall are considered. The wall interacts with the monomers via a long-range interaction. We employ Monte Carlo simulations in the grand canonical ensemble and self-consistent field calculations to study segment profiles, excess free energies, and the wetting behavior. The self-consistent field calculations incorporate the detailed chain structure via a partial enumeration scheme and use a weighteddensity functional ansatz for the monomeric interactions. Quantitative agreement between the Monte Carlo simulations and the self-consistent field calculations is achieved for the conformational arrangements at the wall. Only qualitative agreement is obtained for the excess free energies of interfaces and surfaces. Possible sources for the quantitative deviations are discussed. Using the Young equation, we accurately locate the first-order wetting transition. In the Monte Carlo simulations and the self-consistent field calculations, we find a strong first-order wetting transition and locate the concomitant prewetting line. The behavior of the prewetting line close to the bulk coexistence yields a compatible estimate for locating the wetting transition. The location of the prewetting critical point is estimated in the simulations.