Hi,

You can set the encoding by set the Exchange Property like this
exchange.getProperty(Exchange.CHARSET_NAME, "UTF-8");

Willem

On 2/17/11 2:03 PM, Bill wrote:

Hi,all
There is a webservice,when I invoked by cxf client , It's normal.
but I invoked with camel, the webservice received some infomation :
???è??è??

I watch the LoggingInterceptor in webservice :
-------------------------with camel-cxf--------------
Inbound Message:
  Encoding: ISO-8859-1
  Content-Type: text/xml
  Headers: {content-type=[text/xml],  *******}
  PayLoad: the chartset is normal

Outbound Message:
  Encoding: ISO-8859-1
  Content-Type: text/xml
  PayLoad: the infomation like this :阿布
-------------------------with cxf client----------------
Inbound Message:
  Encoding: UTF-8
  Content-Type: text/xml; charset=UTF-8
  Headers: {content-type=[text/xml; charset=UTF-8],
  PayLoad: the same as above

Outbound Message:
  Encoding: UTF-8
  Content-Type: text/xml
  PayLoad: the chartset is normal


How to set charset with camel-cxf.tks



--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Reply via email to