How to change PIX HTTP headers content type charset

24 views
Skip to first unread message

Miguel Curi

unread,
Feb 3, 2016, 2:24:16 PM2/3/16
to ipf-user
I have a pixv3 endpoint exposed as:


        <camel:route id="webServiceIti44">

          <camel:from uri="pixv3-iti44:iti44Service"/>

          <camel:process ref="iti44Processor"/>

        </camel:route>


And the caller is having an issue because they expect the response to be :


Content-Type: application/soap+xml;charset=UTF-8


But the service is responding with:


Content-Type: application/soap+xml;charset=ISO-8859-1


Is there a configuration setting for using UTF-8 in the charset of the response instead of ISO-8859-1.


Thanks.


Miguel.

Dmytro Rud

unread,
Feb 3, 2016, 5:17:29 PM2/3/16
to ipf-...@googlegroups.com
Hi Miguel,

Set Camel exchange property CHARSET_NAME to whatever you need. 
In fluent syntax it looks like

.setProperty(Exchange.CHARSET_NAME, constant("KOI8-R"))

Best regards
Dmytro
--
You received this message because you are subscribed to the Google Groups "ipf-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ipf-user+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Miguel Curi

unread,
Feb 5, 2016, 10:17:40 AM2/5/16
to ipf-user
Thanks Dmytro, I did the xml version of that and it worked :).
However I am wondering why some of my servers have UTF-8 and some ISO-8859-1.. How does camel determines the default charset? Is that from a server environment variable? Or does the camel implementation of the endpoint defines a default charset somewhere?

Thanks.

Miguel.

Dmytro Rud

unread,
Feb 5, 2016, 10:27:31 AM2/5/16
to ipf-...@googlegroups.com
AFAIK, the value of the JVM property "file.encoding" is used, and when this property is not defined -- the encoding configured in the OS.

Bets regards
Dmytro
Reply all
Reply to author
Forward
0 new messages