Bacterial cell walls and capsules are indeed two very different things, with unique compositions and functions:
Bacterial Cell Wall:
-found in all gram-positive and gram-negative bacteria (but slightly different in each)
-composition: a thick layer of peptidoglycan found outside of the cell...