1

I've tried to send some unicode string in a foreign language to the SOAPMessage.writeTo() but it didn't escape it.

when i tried to send an XML escaped string StringEscapeUtils.escapeXml() it doubled escape the ampersands.

What is the right way to escape those strings ?

Nati
  • 1,034
  • 5
  • 19
  • 46

1 Answers1

0

You don't need to escape unicode chars in an XML file/stream, only XML entities. If you want to process unicode xml properly you have to set:

Right response header: Content-type: text/xml; charset=utf-8 Right XML declaration: <?xml version="1.0" encoding="UTF-8"...

and open the response file with a right editor/console.

DavidC
  • 218
  • 1
  • 12