Explicit solutions are rarely available for water wave scattering problems. An analytical procedure is presented here to solve the boundary value problem associated with wave scattering by a complete vertical porous barrier with two gaps in it. The original problem is decomposed into four problems involving vertical solid barriers. The decomposed problems are solved analytically by using a weakly singular integral equation. Explicit expressions are obtained for the scattering amplitudes and numerical results are presented. The results obtained can be used as a benchmark for other wave scattering problems involving complex geometrical structures.