Electromagnetic Wave Theory for Boundary-Value Problems