Problem found and solved!

First of all - thanks for the quick responses.

I have looked more into kode and the bytes written to my log.
And I can conclude that there is no problem with SAAJ (which would wonder
me) or CXF.
The problem lays in the way bytes are presented onscreen, when nordic
characters are displayed.

Maybe I should start to tell more about the environment i'm working in:

Windows (danish XP version)
RAD 7, which by the way uses cp1252 as encoding in the projects)
IBM MQ


As you proberly know nordic characters is presented as 2 bytes in UTF-8 -
for example is å -> C3 A5.
When the that character is written onscreen or I use Wordpad, the cp1252 is
taking over and the "translation" is å. But if you use ultraedit
to see which bytes (short cut: ctrl+h) it is, it's okay.

So where is the problem? Well the problem lays in the way IBM have
implemented javax.jms.TextMesage. It seams like when a TextMessage is
created the dobbelt bytes are converted into dobbelt bytes. So à is
converted to C3 A0 and ¥ C2 A5.

So the way to solve this is using ByteMessage and luckily CXF gives a way to
set the runtime policy in the WSDL (<jms:runtimePolicy
messageType="binary"/>)
The problem here is that doesn't work in CXF 2.0.1, so I had to take out the
conduit and set the messageType by myself.


JMSConduit conduit = (JMSConduit)client.getConduit();
conduit.getRuntimePolicy().setMessageType(MessageFormatType.BINARY);



-- 
View this message in context: 
http://www.nabble.com/Nordic-charaters-problem-in-SOAP-MQ-tp15845741p15891076.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to