You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Wojcieszyn <wo...@gmail.com> on 2013/01/15 14:43:56 UTC

pollEnrich is ignored on first request from cxfrs

Hi again!

I'm facing another problem !
On a first request (always) after starting my bundle I got an exception from
the camel route:

2013-01-15 14:36:01,179 | WARN  | mer[INRestQueue] |
faultJmsMessageListenerContainer | ?                                   ? |
116 - org.springframework.jms - 3.0.6.RELEASE | Execution of JMS message
 listener failed, and no ErrorHandler has been set.
org.apache.camel.ExpectedBodyTypeException: Could not extract IN message
body as type: interface javax.xml.transform.Source body is: null
        at
org.apache.camel.builder.xml.XsltBuilder.getSource(XsltBuilder.java:433)[91:org.apache.camel.camel-core:2.8.5]
        at
org.apache.camel.builder.xml.XsltBuilder.process(XsltBuilder.java:120)[91:org.apache.camel.camel-core:2.8.5]

The second request succeeds. I think that it is caused by camel ignoring
pollEnrich (or ftp uri).
In logs of the second flow I can see this:
2013-01-15 14:36:24,711 | INFO  | localhost:21/ | FtpConsumer                     
| ?                                   ? | 91 - org.apache.camel.camel-core -
2.8.5 | Connected and logged in to: f
tp://anonymous@localhost:21
which I cannot see in the firsts request processing.
My beans.xml looks like that:

<import resource="classpath:META-INF/cxf/cxf.xml" />

	<jaxrs:server id="restService" address="http://localhost:9000/REST/"
		staticSubresourceResolution="false">
		<jaxrs:serviceBeans>
			<ref bean="restFtpBean" />
		</jaxrs:serviceBeans>
	</jaxrs:server>

	<bean id="restFtpBean"
class="pl.eo.servicemix.poc.rest.RESTFtpProxyService" />

	
	<cxf:rsServer id="rsServer" address="http://localhost:9000/REST/"
serviceClass="pl.eo.servicemix.poc.rest.RESTFtpProxyService" />

	<bean id="fileContentReader"
class="pl.eo.servicemix.poc.bean.FileContentReader" />
	<camel:camelContext xmlns="http://camel.apache.org/schema/spring">

		<route id="RESTFtpReader">
			<from uri="cxfrs://bean://rsServer" />
			<to uri="activemq:queue:INRestQueue" />
		</route>
		<route handleFault="true">
			<from uri="activemq:queue:INRestQueue" />

			<pollEnrich uri="ftp://localhost:21/?fileName=test.xml" />
			
			
			<to
uri="xslt:file:///home/wrudzinski/EsbEvaluation/XSLT/transform.xsl?contentCache=false"
/>
			<log message="${body}" />
			<bean ref="fileContentReader" method="getFileContent" />
			<setHeader headerName="CamelCxfRsUsingHttpAPI">
				<constant>True</constant>
			</setHeader>
			
		</route>
	</camel:camelContext>

What could be the problem ?



--
View this message in context: http://servicemix.396122.n5.nabble.com/pollEnrich-is-ignored-on-first-request-from-cxfrs-tp5715491.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.