We report a theoretical study of the electromagnetic waves (EWs) propagation through an array of superconducting qubits, i.e. coherent two-level systems, embedded in a low-dissipative transmission line. We focus on the near-resonant case as the frequency of EWs (\omega \simeq \omega_q), where (\omega_q) is the qubit frequency. In this limit we derive the effective dynamic nonlinear wave equation allowing one to obtain the frequency dependent transmission coefficient of EWs, (D(\omega)). In the linear regime and a relatively wide frequency region we obtain a strong resonant suppression of (D(\omega)) in both cases of a single qubit and chains composed of a large number of densely arranged qubits. However, in narrow frequency regions a chain of qubits allows the resonant transmission of EWs with greatly enhanced (D(\omega)). In the nonlinear regime realized for a moderate power of applied microwave radiation, we predict and analyze various transitions between states characterized by high and low values of (D(\omega)). These transitions are manifestations of nonequilibrium steady states of an array of qubits achieved in this regime.