Hey, Adding a .convertBodyTo(String.class) before wiretap() fixed the issue. The route configuration is -
from(a).to(b).covertBodyTo(String.class).wiretap(cxf:bean) Thanks a ton. It may be a good idea to add this in the documentation of wiretap component. You may also consider making this a default behaviour for Wiretap when the body is a String. Cheers, HariKrishnan Claus Ibsen-2 wrote: > > On Thu, Sep 10, 2009 at 11:32 PM, HariKrishnan <harikrishna...@gmail.com> > wrote: >> >> Hi, >> >> Irrespective of whether there is an endpoint after a wiretap, the CXF >> bean >> is seems to have the same problem. If my understanding correct, the >> exchange >> body is always a stream. The exception that we are talking about >> (Premature >> End of File) usually happens with streams if they are not closed of >> Flushed. >> I have tried using setStreamChaching(true). But that does not work >> either. >> > > Can you post the full route and point where you configured the stream > caching. > And what version of Camel are you using? > > Adding a .convertBodyTo(String.class) usually remedies this problem > with streams. But yet again the stream cache should help as well. > > >> Thanks, >> HariKrishnan >> >> >> >> Mick Knutson-3 wrote: >>> >>> Try: >>> >>> from(a).wiretap(cxf:bean)*.to(b)* >>> >>> fwik, the wiretap is a middle point before sending to another endpoint. >>> >>> --- >>> Thank You… >>> >>> Mick Knutson, President >>> >>> BASE Logic, Inc. >>> Enterprise Architecture, Design, Mentoring & Agile Consulting >>> p. (866) BLiNC-411: (254-6241-1) >>> f. (415) 685-4233 >>> >>> Website: http://baselogic.com >>> Linked IN: http://linkedin.com/in/mickknutson >>> Vacation Rental: http://tahoe.baselogic.com >>> --- >>> >>> >>> >>> On Thu, Sep 10, 2009 at 1:04 PM, HariKrishnan >>> <harikrishna...@gmail.com>wrote: >>> >>>> >>>> Hey, >>>> >>>> We are using CXF bean to act as a RESTful endpoint. >>>> It seems to work fine when we configure the route as shown below. We >>>> post >>>> an >>>> xml to the url and that gets unmarshalled and sent to the CXF bean. >>>> >>>> from(url).to(cxf:bean) >>>> >>>> But when we use a wiretap component, there is a "Premature end of file >>>> exception". >>>> >>>> from(a).to(b).wiretap(cxf:bean) >>>> >>>> We tried setting the setStreamingCache to true, but that was of no >>>> avail. >>>> >>>> Please let us know if we are missing something here. >>>> >>>> Thanks, >>>> HariKrishnan >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Premature-End-of-File-Exception-in-Camel-wiretap-tp25387224p25387224.html >>>> Sent from the Camel - Users mailing list archive at Nabble.com. >>>> >>>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Premature-End-of-File-Exception-in-Camel-wiretap-tp25387224p25391416.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> > > > > -- > Claus Ibsen > Apache Camel Committer > > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus > > -- View this message in context: http://www.nabble.com/Premature-End-of-File-Exception-in-Camel-wiretap-tp25387224p25399079.html Sent from the Camel - Users mailing list archive at Nabble.com.