[
https://issues.apache.org/activemq/browse/SM-766?page=comments#action_37630 ]
Jorge Rodríguez Pedrianes commented on SM-766:
----------------------------------------------
(I´m sorry i press enter :P)
I have a pojo: public class MyPojo {
public String echo() {
return "Mi tilde á";
}
}
when i try to invoke this method i use jsr181 component, but i see that
the latin1 character is wrong. The problem is in 'Jsr181ExchangeProcessor'
class: in 'doProcess' method, where it's necessary to indicate the character
encoding of 'out' bytes:
// Set response or DONE status
if (isInAndOut(exchange)) {
String charSet = ctx.getOutMessage().getEncoding();
<<<<<-----------------------------
if (ctx.getExchange().hasFaultMessage() &&
ctx.getExchange().getFaultMessage().getBody() != null) {
Fault fault = exchange.createFault();
fault.setContent(new StringSource(out.toString(charSet)));
<<<<<------------------------------
exchange.setFault(fault);
} else {
NormalizedMessage outMsg = exchange.createMessage();
outMsg.setContent(new StringSource(out.toString(charSet)));
<<<<-----------------------------
exchange.setMessage(outMsg, "out");
}
} else {
exchange.setStatus(ExchangeStatus.DONE);
}
Thanks
> Error whit chracters latin1 when send message in JbiChannel. For example "á"
> ----------------------------------------------------------------------------
>
> Key: SM-766
> URL: https://issues.apache.org/activemq/browse/SM-766
> Project: ServiceMix
> Issue Type: Bug
> Components: servicemix-jsr181
> Affects Versions: 3.0.1
> Environment: Windows XP XP2
> servicemix 3.0.1
> Reporter: Jorge Rodríguez Pedrianes
>
> Hello, in this days i try to use jsr181 componet but i had a problem whith
> latin1 characters. I show a example to understad better:
> I hava a pojo: public class MyPojo {
> public String echo() {
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira