Hello:

I'm using CXF 2.7.8
I've created a JAX-RS service with JSON databinding provider (Jettison)
Service is running on Tomcat server in a Windows machine

I've annotated my service class as

@Consumes("*/*")
@Produces("application/json;charset=ISO-8859-1")

but it always returns

Content-Type=[application/json]  , not "application/json;charset=ISO-8859-1"

If I read  returned payload with

BufferedReader br = new BufferedReader(new
InputStreamReader(connection.getInputStream(),"ISO-8859-1"));

prints (bad)

"agent_name":"LÃ-­a"


but with

BufferedReader br = new BufferedReader(new
InputStreamReader(connection.getInputStream(),"UTF-8"));

prints ( right )

"agent_name":"Lí­a"


What am I doing wrong ?
Why Content-Type isn't application/json;charset=ISO-8859-1 ?


Thanks and regards

Reply via email to