I have recently started working with jboss-esb and noticed that some String values got messed up when passed as parameters to methods of a web service. E.g. calling a Method with "ü" as a parameter caused the method to get "ü" instead.

 

I now think that jboss-remoting might be the cause of the problem.

 

A HTTP request was send with charset=UTF-8. The default charset of the server was windows-1252.

HTTPUnMarshaller seems to ignore the charset of the HTTP request and always use the VM's default charset.

 

I think the incorrect line is:

 

BufferedReader reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(totalByteArray)));

 

The constructor InputStreamReader(InputStream) should not be used. Use InputStreamReader(InputStream, String) instead. The value of the String parameter should be taken from the Content-Type. E.g.:
If metadata.get("Content-Type") returns "text/xml;charset=UTF-8", the InputStreamReader should be constructed with "UTF-8" as the second parameter.