We consider the problem of wetting on a heterogeneous wall with mesoscopic defects: i.e., defects of order L-epsilon, 0 < epsilon < 1, where L is some typical length-scale of the system. In this framework, we extend several former rigorous results which were shown for walls with microscopic defects.((10, 11)) Namely, using statistical techniques applied to a suitably defined semi-infinite Ising-model, we derive a generalization of Young's law for rough and heterogeneous surfaces, which is known as the generalized Cassie-Wenzel's equation. In the homogeneous case, we also show that for a particular geometry of the wall, the model can exhibit a surface phase transition between two regimes which are either governed by Wenzel's or by Cassie's law.