When my son was just a little bit older than yours he did the same thing. My doctor said he had pneumonia. I thought he was kidding- vomiting as a pnuemonia symptom? He said it isn't common, but it IS a symptom. He did a chest x-ray to be sure, and there it was. My son has had pneumonia several times since, and it is ALWAYS accompanied by stomach issues. I would ask your doctor for a chest x-ray.
BTW, we moved across town last year and tried to find a new doctor over here, but we ended up with our son (now 4 years old) sick for 6 weeks. The doctors at the new office didn't listen to me about the pneumonia, so they never did an x-ray. At one point they gave him anti-biotics for bronchitis, but they happened to pick the one that doesn't work on pneumonia. When that still didn't help, we decided to make the long drive to our old doctor. He took one look at our son and said, "He has pneumonia." One chest x-ray later, and we found out that he had the worst case of it that he's ever had- because it took so long to find it. I guess what I'm saying here is, don't be afraid to stand up to your doctor. Demand the x-ray if you feel it's needed. I didn't do that this summer, and my son suffered because of it.