I have found a solution to this.
If you have an object that is being returned, then make sure that the object is instanciated.
If you are returning an object Employee. Then by doing a new Employee() and returning it, we get the following xml tag:
Simlarly if Employee was a string then ensure that a empty string ("") is being returned and not null. It gives the same effect as above.