I am calling a SOAP service that is using a different encoding than UTF-8 where is the option to set the encoding for the XML?

I have a set of SOAP services that I have to call as part of my normal processing.  What I am doing is converting the objects to xml using on output mapping, saving it and then posting the message.  The SOAP services will be changing soon from accepting UTF-8 to only accepting ISO-8859-1.    What do I need to set, and where in order to have the encoding for all outgoing XML messages be ISO-8859-1?
2 answers

Export mappings always export to UTF-8. As long as you use only ISO-8859-1 characters in your application, the result of the mapping is an ISO-8859-1 string. It just has the wrong encoding declaration. If you replace the UTF-8 encoding declaration with iso-8859-1, the message should be accepted by the SOAP service.

So try the following:

  • Use an Export with Mapping action to export to string
  • Replace the first occurrence of UTF-8 with iso-8859-1
  • Call the webservice with a Custom request template


That looks something like this:


Have you discussed this with the implementation side? Why are they removing support for UTF-8? This is a default encoding that should be supported by all webservices.

According to WS-I Basic Profile 1.0 the xml parser used by a webservice needs to support UTF-8: http://www.ws-i.org/profiles/BasicProfile-1.0-2004-04-16.html#refinement16457984.