-
1. Re: parse stream exception
ffang Feb 23, 2012 7:59 PM (in response to gauthamr)Hi,
Could you elaborate your scenario?
From the stacktrace seems you're using camel-cxf endpoint, could you post your router here so that you can get more concrete help quickly?
The "coudn't parse stream" could caused by the stream already get consumed, you can try to add streamCache="true" attribute to your camelContext/router to see if it helps.
Freeman
-
2. Re: parse stream exception
gauthamr Feb 24, 2012 12:47 AM (in response to ffang)Hi,
Basically what I am trying here is, taking a request at my service cxf endpoint , applying a transformation to that request body and routing the same to another cxf endpoint which understands the translated request.
I have attached a sample camel route as a reference.
Kindly let me know if this approach is wrong
Regards,
gautham
-
route.txt 875 bytes
-
-
3. Re: parse stream exception
ffang Feb 24, 2012 12:55 AM (in response to gauthamr)Hi,
Ok, the xslt consumed the stream before send to the next cxf endpoint, so you need add
streamCache="true" to your route. Take a look at to get more details.
http://camel.apache.org/stream-caching.html
Freeman
-
4. Re: parse stream exception
gauthamr Feb 24, 2012 1:12 AM (in response to ffang)Hi,
Sorry to say this but enabling streamCache didn't fix it.
I also tried bypassing the xsl translation but still getting the same parse stream issue. Is it because of my payload data format or am I doing something really wrong.
Regards,
gautham
-
5. Re: parse stream exception
njiang Feb 24, 2012 1:27 AM (in response to gauthamr)org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1181)[cxf-common-utilities-2.5.2.jar:2.5.2]
at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:104)[cxf-rt-core-2.4.1-fuse-00-53.jar:2.4.1-fuse-00-53]
It looks like you are put two different version CXF jars together.
Can you double check it ?
Willem
-
6. Re: parse stream exception
gauthamr Feb 24, 2012 2:35 AM (in response to njiang)Hi,
I checked and made sure my cxf-api,rt,utilities are pointing to same version of jars but still facing same error. Attached for reference
Regards,
Gautham
-
error.txt 6.5 KB
-
-
7. Re: parse stream exception
gauthamr Feb 24, 2012 4:38 AM (in response to gauthamr)hi,
I somehow got the issue resolved by changing my jetty jar to point to cxf-core version.
With this i got an other issue " The PayLoad elements cannot fit with the message
parts of the BindingOperation. Please check the BindingOperation and PayLoadMessage"
So I just changed my data format from payload to message, it started working fine.
Although i still don't know how to work with payload option.
Regards,
Gautham