It sounds like either a food sensitivity or a bowel/stomach condition. It may pay to ask the vet for an ultrasound just in case (expensive though) . Are his stools ok? Is he fixed? My aussie shephard goes off food for a week if there is a dog in heat, he also throws up...mostly foam. If it is a food sensitivity, he will need a holistic or veggie diet probably, with protein supplements. Hope it helps.