This paper studies a wireless sensor relay network consist of a source, a jammer, some distribution helping relays, a information decoding (ID) receiver and a Energy harvesting (EH) receiver. In the first time-slot, the source transmits the legitimate signal to the helping relays equipped a single antenna. Meanwhile, the jammer transmits the jamming signal to the relays in order to disturb the communication between the source and the ID receiver. In the second time-slot, the relays forward the sum signal from the source and jammer to the ID receiver employing beamforming. Meanwhile, the EH receiver need to receive the sufficient energy radiated from the relays satisfying the EH constraint to prolong the service life. With the linear beamforming scheme at the relays, this network can be modeled as an equivalent Gaussian arbitrarily varying channel (GAVC). The purpose is to seek the maximal transmission rate under the EH constraint. Since this problem is nonconvex and hard to tackle, we present a second order cone programming (SOCP)-based algorithm to obtain the optimal beamforming vector so as to maximize the transmission rate between the source and ID receiver when perfect channel state information (CSI) is available. In addition, the two important points of the Rate-Energy Region is identified by (SOCP)-based algorithm. Finally, simulations are used to validate the proposed scheme.