Hi

Sergey Beryozkin-5 wrote
> So we have a Soap Client adapter (within a JAX-RS server method) getting 
> a response back with Bulgarian characters. Can you confirm please that 
> the data which is now about to be returned from the JAX-RS server method 
> have the expected City and Address ?
> 
> Assuming it does, try updating @Produces value by adding a 'charset' 
> parameter.

Actually the problem is at the other end, ie. at the SOAP Client should, but
does not seem to, get correctly the contents of City & Address fields hence
in my code I never get the correct data. As a result whereas the soapUI gets 
>>                                   <City>Варна</City> 
>>                                  <Address>жк. Чайка</Address> 

I see in my log the SOAP Response as follows, 
>>                                   <City>Р?Р°С?РЅР°</City> 
>>                                   <Address>жк. Чайка</Address> 
>> 

then of course the returned value by the JAX-RS method is further mungled as
it doesn't receive UTF-8. Hence the question remains why the difference in
the SOAPClient vs soapUI response. Should I be providing something else as
part of my CXF SOAP Headers which will result in correct response? I have
looked again at the wireshark log and the soapUI request puts "encoding:
gzip" but the CXF does not set any encoding and that is the only difference
I can see 

Finally, I have also followed your advice and tried to return the "mangled"
response to the client  by changing the @Produces as follows

@Produces("application/json, charset=UTF-8")

However, now the JAXRS throws the following error (SELResponse is the
object, turned to JSON returned by my JAX-RS method to the client)

WARN  [org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor]
(http-/127.0.0.1:8080-1) No message body writer has been found for response
class SELResponse.

and my client gets HTTP 500 with the same error.

Finally (sorry for the long response). When I "mock" in my code the response
of the external SOAP webservice ie:
Address=жк. Чайка & City=Варна

and without the "charset" property in the @Produces then my client gets the
correct data back in UTF-8 format.

Thanks,
Stelios




--
View this message in context: 
http://cxf.547215.n5.nabble.com/CXF-Client-Problem-with-Encodings-tp5714097p5714335.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to