Web Service Not Returning XML Tag When Column Is Null
Posted on 2011-09-28
I have a web service that is being consumed by an Infopath 2010 form. Here's a brief outline of how the web service works:
The web service queries an Oracle database. It stores the result in a dataset. It then loads the dataset in to an XMLDocument type. Returns XMLDocument
When I query the web service, it returns most of the data as expected. However, if certain columns returned by the query are null, then there is no trace of that column in the returned XMLDocument. For example:
If <field2/> was null, I'd like to see:
But I'm getting:
I've searched for several hours trying to find a solution and have repeatedly come close but still havent found a solution.
My question is, how can I force the web service to include the tags of the null columns? I presume I need to incorporate the schema but how?
I repeat, I've searched for several hours so I've probably followed most of the relevant links so I'm asking you in the nicest possible way, please don't point me towards a link unless you have actually witnessed it solving the problem I've described
Thanks in advance,