We have acouple of SOAP-Services here (running in IIS as dll's in a application pool).

We have acouple of SOAP-Services here (running in IIS as dll's in a application pool).

I am wondering if i should continue using "Ansistring" as data type for TRemotable class and for parameters in functions/procedures. Or should i change to "string"?
If i let the assistant in the ide create a new soap service project, then it still uses "Ansistring".

So i am unsure what type i should use. I tought that all the internet stuff are UTF8 so best would be to use "string" in soap services.


https://community.embarcadero.com/forum/enterprise/6537-soap-service-string-vs-ansistring-xe10-2

https://community.embarcadero.com/forum/enterprise/6537-soap-service-string-vs-ansistring-xe10-2

Comments

  1. Get an answer from Marco Cantu in the community (Thanks!):

    "In general terms, yes, it would be better and we should update the wizards. The main issue is that code doesn't even compile on some of the newer platforms.
    Still, when interfacing with an external system, string formats have to be agreed, so this would also partially depend on the format of the entire data flow (URT16, UTF8, etc)"

    So i will go with "string" instead of "AnsiString"

    ReplyDelete
  2. Note that `string` defaults to UTF-16, whereas SOAP is usually UTF-8 as that's the default for XML: stackoverflow.com - How default is the default encoding (UTF-8) in the XML Declaration?

    ReplyDelete

Post a Comment