0
I have an integration made by Web-service (asmx) , C# e SQL Server
.
This Web-Service is consumed by a third-party software that uses Delphi and Firebird.
The problem is that when integrating a string field that has special characters, questions (??) are appearing instead of characters.
For example, the Delphi program sends a customer registration with the name John , when you arrive at the web-service is Jo?? o.
Is there anything I can do on the web-service to avoid this problem? or should the treatment be done on the client’s side? And what should be done?
I tried to include a globalization to resolve the situation, it did not work:
<globalization
requestEncoding="iso-8859-1"
responseEncoding="iso-8859-1"
responseHeaderEncoding="iso-8859-1"
fileEncoding="iso-8859-1"
resourceProviderFactoryType=""
enableBestFitResponseEncoding="true"/>
Example of the Webmethod:
[WebMethod]
public MessageRet IntegrarItemInsumo(ItemInsumo Object)
{
try
{
return Object.Add();
}
catch (Exception)
{
throw;
}
}
What is the web-service charset? post how you are receiving the data and the method you receive it.
– Marco Souza
It was with UFT-8 , after reading some post I include globalization in config, but it did not help. <globalization requestEncoding="iso-8859-1" responseEncoding="iso-8859-1" responseHeaderEncoding="iso-8859-1" fileEncoding="iso-8859-1" resourceProviderFactoryType="" sponenableBestFitReseEncoding=true""/>
– BrianSouza
Edit your question and post as you do when receiving the dice.
– Marco Souza
user3410955, I believe your client is not informing you
ContentType
appropriate, try to force theHttpContext.Current.Request.ContentType
fortext/xml; charset=UTF-8
before deserialiation occurs.– Tobias Mesquita
@Tobymosque , when you say client would be on the side of Delphi software and not webservice C# ?
– BrianSouza
@Briansouza, yes, client is the Delphi application that consumes your Webservice, however you can try to change this header in your application.
– Tobias Mesquita
@Tobymosque , how ? would have some link to instruct me ?
– BrianSouza