Search code examples
c#web-serviceswcfsoapinvalid-characters

Incomplete response from webservice C# SoapClient


My software use a 'Service Reference', auto generated to deal with a 3party SOAP webservice. The service has a method that return a response with a single string property

This string has some data with ';' separators, include a XML text with business data.

In some responses i note a incomplete response text it always end on a some like this.

um prejuízo ao hospital.&#xd

The &#xd seams br the problem.

Well a try to execute the same method on WCF Test and SoapUI and for my surprise, the response is complete and correct.

Search on the web a found some material about this characters, is a illegal, but not to solve my problem.


Solution

  • Configure the encoding inside the binding with the "textMessageEncoding" element.