You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jaikishore <ja...@syntelinc.com> on 2011/07/18 12:56:20 UTC

CXF encoding issue

Hi Freeman, 

I am experiencing difficulty in retrieving the response from
servicemix-CXF-BC component. The expected content is something like.... 
.... 
<Line Type="A" SecondaryQualifier="">
  <Text>5Y‡CHAD</Text>
</Line>
<Line Type="A" SecondaryQualifier="">
  <Text>5E‡CHAD TEST</Text>
</Line>
<Line Type="A" SecondaryQualifier="">
  <Text>5Y‡/CHAD</Text>
</Line>
... 

What I am getting back contains, some additional special characters like... 

<Line Number="1" Type="A">
  <Text>5Y‡CHAD</Text>
</Line>
<Line Number="2" Type="A">
  <Text>5C‡CHAD TEST</Text>
</Line>
<Line Number="3" Type="A">
  <Text>5Y‡/CHAD</Text>
</Line>

Source source = exchange.getOutMessage().getContent(); 
String xml = Util.getStringFromSource(source); 

Looks like encoding issues. 
Please kindly help. How to solve this issue ? 


--
View this message in context: http://servicemix.396122.n5.nabble.com/CXF-encoding-issue-tp4598981p4598981.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: CXF encoding issue

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Could you elaborate your workingflow more, especially you're using cxf  
bc consumer or cxf bc provider?
Could you add some tool like tcp monitor between the cxf bc endpoint  
and your external endpoint which can dump the on-wire message, it  
would be very helpful to narrow down the problem.

Freeman
On 2011-7-18, at 下午6:56, jaikishore wrote:

> Hi Freeman,
>
> I am experiencing difficulty in retrieving the response from
> servicemix-CXF-BC component. The expected content is something  
> like....
> ....
> <Line Type="A" SecondaryQualifier="">
>  <Text>5Y‡CHAD</Text>
> </Line>
> <Line Type="A" SecondaryQualifier="">
>  <Text>5E‡CHAD TEST</Text>
> </Line>
> <Line Type="A" SecondaryQualifier="">
>  <Text>5Y‡/CHAD</Text>
> </Line>
> ...
>
> What I am getting back contains, some additional special characters  
> like...
>
> <Line Number="1" Type="A">
>  <Text>5Y‡CHAD</Text>
> </Line>
> <Line Number="2" Type="A">
>  <Text>5C‡CHAD TEST</Text>
> </Line>
> <Line Number="3" Type="A">
>  <Text>5Y‡/CHAD</Text>
> </Line>
>
> Source source = exchange.getOutMessage().getContent();
> String xml = Util.getStringFromSource(source);
>
> Looks like encoding issues.
> Please kindly help. How to solve this issue ?
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/CXF-encoding-issue-tp4598981p4598981.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com