title: Web service generates bad xml: Hexadecimal value 0x00 is a invalid character error
body: <p>VS 2019 VB.NET and c#</p>
  <p>I have a web service that calls another web service. The provider web service returns an array of objects. The consumer web service tries to assign the results of the call to a variable and throws an error:</p>
  <p><code>Hexadecimal value 0x00 is a invalid character, line 1, position nnnnn</code></p>
  <p>Note I do not convert the results to or from xml, the 'system' is doing that.</p>
  <p>I checked the data and while complex it is fine.  I found through trial and error that if I remove a single field that happens to be set to Nothing it works (there are hundreds of fields and many are nothing).  I can see nothing special about the field I removed. So it sounds buggy.</p>
  <p>I was thinking it might be a unicode issue so I added a globalization entry to the provider web service web.config:</p>
  <p><code>&lt;globalization requestEncoding=&quot;utf-8&quot; responseEncoding=&quot;utf-8&quot;/&gt;</code></p>
  <p>Which had no effect.</p>
  <p>So I have an array of objects (I simplified it to a count of 1, still get the error) that I am trying to return and somewhere between return statement in the provider web service and the assignment of the results to a variable in the consumer web service I'm getting bad xml.</p>
  <p>I suppose I could convert it to xml myself, ensuring it is valid, and serve that, but it seems like it should work as is.</p>
  <p>Any ideas on how I can track this down?</p>
  <p>ADDENDUM</p>
  <p>Should have made this a bit more clear.  I'm returning an array of user defined objects from a web method, so the data is serialized into a XML SOAP response. If I use postman to look at the response the soap xml response is valid, however when a remote service calls the web method I see this error. So first I'm not sure where the error is being introduced...it does not look like the web method is at fault, postman can call it and get valid xml.  But my other program, that happens to be a web service as well, presumably gets bad xml from the request.</p>