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/04 15:44:20 UTC

ServiceMix 4 proxing FTP file via REST Service

Hi Guys !

I'm dealing with a problem how to read a file with Camel in SMX 4.4.2 but
only in case when
the read operation cannot be performed in /Camel route from/. I need to read
data from the file transform it into XML and then return it to the requestor
(the requestor hits SMX via REST Service). I'm having serious problems with
reading the file after the REST invokation.

Routes are like these:

/<jaxrs:server id="restService" address="http://localhost:9000/REST/"
		staticSubresourceResolution="true">
		<jaxrs:serviceBeans>
			<ref bean="restFtpBean" />
		</jaxrs:serviceBeans>
	</jaxrs:server>
	
	<bean id="restFtpBean" class="poc.rest.RESTFtpProxyService" />

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


	<camel:camelContext xmlns="http://camel.apache.org/schema/spring">
	<endpoint id="ftpProvider" uri="ftp://localhost:21/?fileName=test.xml" />
		<route>
			<from uri="cxfrs://bean://rsServer" />		
			<to ref="ftpProvider" />
		</route>
	</camel:camelContext>/

In this scenario Camel tries to write to file !
What am I doing wrong ?




--
View this message in context: http://servicemix.396122.n5.nabble.com/ServiceMix-4-proxing-FTP-file-via-REST-Service-tp5715411.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.

Re: ServiceMix 4 proxing FTP file via REST Service

Posted by Wojcieszyn <wo...@gmail.com>.
In some other place Claus Ibsen answered my question.

I used the <pollEnrich uri="ftp://localhost:21/?fileName=test.xml" /> and it
worked perfectly.




--
View this message in context: http://servicemix.396122.n5.nabble.com/ServiceMix-4-proxing-FTP-file-via-REST-Service-tp5715411p5715448.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.