Compositions and methods for eliciting an immune response against Streptococcus pneumoniae are described. More particularly, the present disclosure relates to immunogenic PcpA polypeptides, including fragments of PcpA and variants thereof, and nucleic acids that encode the polypeptides. The present disclosure further relates to methods of making and using the immunogenic polypeptides. Further provided is a method of diagnosing pneumococcal infection (e.g., pneumonia) in a subject by obtaining a biological sample from the subject and detecting one or more pneumococcal antigens that are selectively expressed during invasion (e.g., PcpA or fragments thereof).