cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: default encoding in LoggingInInterceptor
Date Tue, 16 Aug 2016 09:58:59 GMT
Hi

I'm still planning to investigate why only the out logging interceptor 
on the server side which is being affected

Cheers, Sergey
On 15/08/16 12:47, Vjacheslav V. Borisov wrote:
> Used inteceptor from http://cxf.547215.n5.nabble.
> com/Problem-with-web-service-client-encoding-td5724499.html
> With encoding as parameter
>
> public class EncodingInterceptor extends AbstractPhaseInterceptor<Message> {
>
>     String encoding="UTF-8";
>
>     public void setEncoding(String encoding) {
>         this.encoding = encoding;
>     }
>
>
>
>     public EncodingInterceptor() {
>         super(Phase.RECEIVE);
>     }
>
>     @Override
>     public void handleMessage(Message message) throws Fault {
>         String encoding = (String) message.get(Message.ENCODING);
>
>         if (encoding == null || !encoding.equals(encoding)) {
>             message.put(Message.ENCODING, encoding);
>         }
>     }
>
> }
>
> 2016-08-09 10:33 GMT+04:00 Vjacheslav V. Borisov <slavb18@gmail.com>:
>
>> Hi!
>>
>> Cannot log properly UTF-8 encoded requests using
>> org.apache.cxf.interceptor.LoggingInInterceptor
>> I see in log
>> Encoding: ISO-8859-1 and Payload with incorrect characters
>>
>> Do i need to write
>> something like public class EncodingInterceptor extends
>> AbstractPhaseInterceptor<Message> {
>>
>> http://cxf.547215.n5.nabble.com/Problem-with-web-service-
>> client-encoding-td5724499.html
>>
>> or there is configuration parameter for defaul encoding ?
>>
>>
>>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Mime
View raw message