A relativistic fluid model of a plasma in the case of a general polytropic process is considered. A ''trajectory-boundary'' method of analysis of electrostatic solitons is proposed as an alternative to the formalism of the Sagdeev pseudopotential, and is generalized to obtain an existence domain for compressive relativistic solitons in a two-component plasma.