Hi,
Not because a SFP is Juniper it will work on all Juniper devices. In the following link type your SRX model in the search bar and it will take you to the supported SFPs for your SRX. Confirm if the one you have is listed there. Try the same with your EX model.
https://apps.juniper.net/hct/home/
Please mark my comment as "Solution" if it applies.