You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by bhushand <bh...@yahoo.co.in> on 2013/10/25 16:23:08 UTC

SAXParseException due to invalid characters in cxf endpoint response

Hello All
        We are facing an issue which is due to some invalid charaters in
response returned by webservice. We are using Camel 2.9.2 for routing, cxf
2.6.0 to configure jaxws endpoint of our webservice. When response returned
from webservice contains some invalid charaters, consumer of our service
getting SAXParseException. That charaters get properly displayed at our
end,but consumers are getting issue. Also when some escape charaters
present, it is displayed as,

DB Value        Value displayed in response
'                              &apos;
<                             &lt;
>                              &gt;
&                             &amp;

        But we want to display DB values as it is. Is it there any issue
with encoding. By assuming this as cause we tried to configure
JAXBDataBinding in endpoint, also tried with interceptor to forcefully
change the encoding as UTF-8.
        We got success by doing so. We can see UTF-8 coming in content
type,but when same code is deployed on environment servers again content
type does not contains UTF-8.

         Can someone help me please, why it is so. Are we missing something,
or wrong approch. 



Thanks in advance
Bhushan




--
View this message in context: http://camel.465427.n5.nabble.com/SAXParseException-due-to-invalid-characters-in-cxf-endpoint-response-tp5742212.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: SAXParseException due to invalid characters in cxf endpoint response

Posted by Willem jiang <wi...@gmail.com>.
It is hard the get to know the key of issue without knowing the route.
Can I know if your other environment server default encoding is UTF_8?


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem




On Sunday, October 27, 2013 at 12:04 AM, bhushand wrote:

> Hi Claus
> Thank for reply, i will keep in mind your suggestion. Please find my
> comment,
>  
> Also your first post its not clear if the DB value and display value  
> is different. Looking in the mail they look the same. -- While writting post
> I had given different values but maybe due to IE it get displayed same. Our
> main problem is ,in our response header content-type does not contains
> UTF-8. We can see its there when response is coming from our local server
> but not in response from different environment servers. As we are using
> websphere, is there any property need to set because interceptor and other
> things are not working for us.
>  
>  
>  
> Thanks
> Bhushan
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/SAXParseException-due-to-invalid-characters-in-cxf-endpoint-response-tp5742212p5742259.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).




Re: SAXParseException due to invalid characters in cxf endpoint response

Posted by bhushand <bh...@yahoo.co.in>.
Hi Claus
       Thank for reply, i will keep in mind your suggestion. Please find my
comment,

Also your first post its not clear if the DB value and display value 
is different. Looking in the mail they look the same. -- While writting post
I had given different values but maybe due to IE it get displayed same. Our
main problem is ,in our response header content-type does not contains
UTF-8. We can see its there when response is coming from our local server
but not in response from different environment servers. As we are using
websphere, is there any property need to set because interceptor and other
things are not working for us.



Thanks
Bhushan



--
View this message in context: http://camel.465427.n5.nabble.com/SAXParseException-due-to-invalid-characters-in-cxf-endpoint-response-tp5742212p5742259.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: SAXParseException due to invalid characters in cxf endpoint response

Posted by Claus Ibsen <cl...@gmail.com>.
On Sat, Oct 26, 2013 at 8:25 AM, bhushand <bh...@yahoo.co.in> wrote:
> Hello, can I get some help,please.
>

See this page
http://camel.apache.org/support

As said on the bottom of that page, the help on these user forums is
volunteer based, and many of us, are busy with our work et all.

So to get faster help, its often better to help yourself by diving
more into the problem, and isolating the problem as well.

And on the page: http://camel.apache.org/support
We have points what you can do to help yourself and what information
you should provide when asking for help etc.

Also your first post its not clear if the DB value and display value
is different. Looking in the mail they look the same.


>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/SAXParseException-due-to-invalid-characters-in-cxf-endpoint-response-tp5742212p5742243.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: SAXParseException due to invalid characters in cxf endpoint response

Posted by Christian Müller <ch...@gmail.com>.
Which Camel component do you use (We have multiple components which
supports "web services")?
Can you share your route with us?
Can you share a sample message with us?

The best would be if you can provide a unit test which show the issue.

Best,

Christian
-----------------

Software Integration Specialist

Apache Member
V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
Apache Incubator PMC Member

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Sat, Oct 26, 2013 at 8:25 AM, bhushand <bh...@yahoo.co.in>wrote:

> Hello, can I get some help,please.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/SAXParseException-due-to-invalid-characters-in-cxf-endpoint-response-tp5742212p5742243.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: SAXParseException due to invalid characters in cxf endpoint response

Posted by bhushand <bh...@yahoo.co.in>.
Hello, can I get some help,please.



--
View this message in context: http://camel.465427.n5.nabble.com/SAXParseException-due-to-invalid-characters-in-cxf-endpoint-response-tp5742212p5742243.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: SAXParseException due to invalid characters in cxf endpoint response

Posted by bhushand <bh...@yahoo.co.in>.
One thing to mention...we are using websphere for deployment. On our local
server it is running fine, on environments it is causing error.



--
View this message in context: http://camel.465427.n5.nabble.com/SAXParseException-due-to-invalid-characters-in-cxf-endpoint-response-tp5742212p5742216.html
Sent from the Camel - Users mailing list archive at Nabble.com.