Associations between coronal mass ejections and soft X-ray events