Details please. 1) What version of CXF? 2) What frontend and data binding? 3) I read you to be saying that Strings are mishandled in the actual java object fields, not in the MTOM attachment content, but please confirm. 4) What is the client? The most straightforward explanation here is that the client is sending ISO-8859-1 but CXF is interpreting it as UTF-8. Is the client CXF, or some other package?
On Fri, Oct 30, 2009 at 5:38 AM, Daniel Weidele <[email protected]> wrote: > Hi @, > > > > i am currently developping a Web Application Front-End, which ist > communcating with a Web-Service Back-End. For SOAP Handling we decided to > use CXF (with MTOM!). The Front-End Rendering etc. is being done with JSP / > JSF (MyFaces Implementation). > > > > Now everything works fine and performs quite well, but we have one VERY > ENORMOUS NECK-BREAKING KILLER TROUBLE BUG, which is: > ENCODING/DECODING...[only the "special german chars" like "ä", "ö", "ü", > "ß", etc.] > > > > I already took a look into the low-level SOAP Message: Encoding is always > specified there as UTF-8, for IN-BOUND as well as the OUT-BOUND Messages. > > I did this using the cxf config xml telling the service to log the SOAP > messages to the console. So as i said i have "UTF-8" in the SOAPs - and in > the console, the chars are correctly written. > > > > Now the BUT: > > As soon as on the Front-End Side, CXF has parsed the SOAP into an "Object" > (i found this code-line in the internals of CXF), the chars are BADLY > decoded, so that i see bad characters in the Debug-Variable view. > > So even after casting the "Object" into the real "ServiceResponseObject" > and all other steps inside CXF, the String stays wrong, so that finally i > also have the badly coded String in my Front-End level. > > > > It looks like the String is being double UTF-8 encoded and afterwards only > once decoded to Latin, because out of "für" i am getting "für" as the > decoded result String. > > The other possibility would be once encoded to UTF-8, and never really > decoded. > > > > I actually have no idea where this problem might internally come from. > Maybe it has something to do with the MTOM extension? > > > > Our current solution ist just decoding the String once again after > receiving it from CXF. But of course, this is not a solution with great > glamour... > > > > So my question to you would be: > > Does anyone have any ideas what WE might have done wrong, or if there > exists a patch (if the problem is really inside CXF) or if there exists a > better solution than we have? > > > > Thanks a lot! > > Daniel > >
