187.4. 如何在 Xstream DataFormat 中设置 XML 编码?
在 Camel 2.2.0 中,您可以通过密钥 Exchange.CHARSET_NAME
设置 Xstream DataFormat 中的 XML 编码,或者从 DSL 或 Spring 配置设置 Xstream 上的编码属性。
from("activemq:My.Queue"). marshal().xstream("UTF-8"). to("mqseries:Another.Queue");
from("activemq:My.Queue").
marshal().xstream("UTF-8").
to("mqseries:Another.Queue");