Hi Stefan, If I understand your problem correctly, I think you need to add an interceptor that escapes those spaces to your InIntercpetors.
One possible way, if you do use XML, is to use org.apache.cxf.interceptor.transform.TransformInInterceptor: 1. Instantiate a TransformInInterceptor 2. On the new interceptor define transformations that escape the spaces (like " " -> "| |", " " -> "| |", or perhaps " " -> "&20;") 3. Add the configured interceptor to your InInterceptos. 4. Interpret the escaped spaces back to spaces. I hope this helps. Joel On 25 December 2017 at 23:12, Andrei Shakirin <[email protected]> wrote: > Hi, > > Which media type are you using by communication, is it XML / JSON/ > something different ? > > Regards, > Andrei. > > > -----Original Message----- > > From: [email protected] [mailto:[email protected]] > > Sent: Mittwoch, 20. Dezember 2017 11:47 > > To: [email protected] > > Subject: CXF treats empty and blank Strings as null > > > > Hi > > > > We are facing an issue with CXF regarding the marshalling of empty/blank > > string. > > > > By default CXF treats empty and blank Strings as null. Unfortunately we > are > > consuming a legacy service where a String with containing spaces > actually has > > meaning and therefore should not be treated as null. > > > > Is there a way to configure the marshaller to differentiate between and > empty- > > string "" and a blank-string " "? So that the blank-string is preserved? > > > > > > > > best regards > > > > Stefan Goebel >
