I'm finding a particular service to be encoding strings as base64 when they contain any 8bit chars, although they are all within the UTF8 charset.

I'm using a bean deserializer to receive this complex type, and only on very rare occasions will a string come back as base64 rather than xsd:string.

This leads to a type mismatch when the bean deserializer tries to set the bean property, which is a String.

Given that base64 gets deserialized as a byte[], and I know that this byte array safely contains a UTF8 String, what can I do to get the deserializer to do the byte[] to String conversion and set the bean property?

Reply via email to