Details
Description
When sending UTF-16 messages Synapse sets the encoding to UTF-8.
2010-07-15 16:39:48,402 [127.0.1.1-evanthika-laptop] [HttpServerWorker-1] INFO LogMediator To: /, WSAction: urn:getQuote, SOAPAction: urn:getQuote, MessageID: urn:uuid:3C7A99D355437431851279192188324, Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:getQuote xmlns:ns="http://services.samples"><ns:request><ns:symbol>IBM</ns:symbol></ns:request></ns:getQuote></soapenv:Body></soapenv:Envelope>
Then messages fails with the following exception
2010-07-15 16:39:48,657 [127.0.1.1-evanthika-laptop] [HttpClientWorker-1] ERROR ClientWorker Fault creating response SOAP envelope
org.apache.axis2.AxisFault: Character Set Encoding from transport information [UTF-8] does not match with character set encoding in the received SOAP message [UTF-16]
at org.apache.axis2.builder.BuilderUtil.validateCharSetEncoding(BuilderUtil.java:786)
at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:57)
at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:164)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:112)
at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:170)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)