null elements not showing in response xml (SOAP web service)

Availfecela

New Member
I've created an asp.net web service for a client of ours which returns multiple \[code\]List\[/code\] objects containing complex types. The client has been receiving data just fine.He has noticed though that not all the tags are there all the time. If, for example, I return 3 objects in my list, objects A B and C. and C is null when I return it. It will show:\[code\]<A>data</A><B>data</B>\[/code\]When I would like it to show the following:\[code\]<A>data</A><B>data</B><C/>\[/code\]Or at least:\[code\]<A>data</A><B>data</B><C></C>\[/code\]Basically, I want the structure of the XML to remain the same regardless of what data is available and what data is null.Any suggestions?Thanks a lot!!
 
Back
Top