Hi,
I am polling a file (text file) from one directory to other directory in my local machine successfully with BinaryFileMarshaler. When I am using the same logic with some changes needed for FTP for polling a file from ftp server to my local directory, I am getting a file with 0 bytes into my local directory. My xbean.xml and servicemix.xml files are look like this... Xbean.xml for ftppoller: <beans xmlns:ftp="http://servicemix.apache.org/ftp/1.0" xmlns:pollfile="http://pollfile.example.com/pollFile"> <classpath> <location>.</location> <location>lib/servicemix-components-3.1-incubating.jar</location> <location>lib/servicemix-core-3.1-incubating.jar</location> <location>lib/commons-io-1.0.jar</location> </classpath> <ftp:poller service="pollfile:ftpPoller" endpoint="endpoint" targetService="pollfile:fileSender" uri="ftp://username:[EMAIL PROTECTED]/folder"> <bean class="org.apache.servicemix.components.net.FTPPoller"> <property name="marshaler"> <bean class="org.apache.servicemix.components.util.BinaryFileMarshaler" /> </property> <property name="clientPool"> <bean id="ftpClientPool" class="org.apache.servicemix.components.net.FTPClientPool"/> </property> <property name="period" value="600000"/> </bean> </ftp:poller> </beans> Servicemix.xml for FileWriter: <beans xmlns:sm="http://servicemix.apache.org/config/1.0" xmlns:pollfile="http://pollfile.example.com/pollFile"> <classpath> <location>.</location> <location>lib/servicemix-components-3.1-incubating.jar</location> </classpath> <sm:serviceunit id="jbi"> <sm:activationSpecs> <!-- Write files to the destination directory --> <sm:activationSpec componentName="fileSender" service="pollfile:fileSender"> <sm:component> <bean class="org.apache.servicemix.components.file.FileWriter"> <property name="directory" value="D:/dest" /> <property name="marshaler"> <bean class="org.apache.servicemix.components.util.BinaryFileMarshaler" /> </property> </bean> </sm:component> </sm:activationSpec> </sm:activationSpecs> </sm:serviceunit> </beans> The error in my server log is: Server log Error: id: ID:PCIIB09816-4747-1182177174381-7:13 status: Error role: consumer service: {http://pollfile.cts.com/pollFile}fileSender endpoint: fileSender in: Unable to display: java.net.SocketException: socket closed error: javax.jbi.messaging.MessagingException: javax.xml.transform.TransformerException: java.net.SocketException: socket closed] 2007-06-18 20:16:09,317 DEBUG [org.apache.servicemix.jbi.messaging.DeliveryChannelImpl] Notifying exchange ID:PCIIB09816-4747-1182177174381- 7:13(1628303) in DeliveryChannel{servicemix-ftp} from processInboundSynchronousExchange 2007-06-18 20:16:09,317 DEBUG [org.apache.servicemix.jbi.messaging.DeliveryChannelImpl] Notified: ID:PCIIB09816-4747-1182177174381-7:13(1628303) in DeliveryChannel{servicemix-ftp} from sendSync 2007-06-18 20:16:09,536 ERROR [org.apache.servicemix.ftp.FtpComponent] Failed to process file: /bobbin/Binary.txt. Reason: javax.jbi.messaging.MessagingException: javax.xml.transform.TransformerException: java.net.SocketException: socket closed javax.jbi.messaging.MessagingException: javax.xml.transform.TransformerException: java.net.SocketException: socket closed at org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessageC ontent(DefaultFileMarshaler.java:140) at org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessage( DefaultFileMarshaler.java:75) at org.apache.servicemix.components.file.FileWriter.process(FileWriter.java :120) at org.apache.servicemix.components.util.OutBinding.onMessageExchange(OutBi nding.java:49) at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D eliveryChannelImpl.java:593) at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j ava:174) at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java :176) at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:1 34) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker .runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker .run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:595) Caused by: javax.xml.transform.TransformerException: java.net.SocketException: socket closed at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transform erIdentityImpl.java:505) at org.apache.servicemix.jbi.jaxp.SourceTransformer.toResult(SourceTransfor mer.java:85) at org.apache.servicemix.components.util.DefaultFileMarshaler.writeMessageC ontent(DefaultFileMarshaler.java:138) ... 10 more Caused by: java.net.SocketException: socket closed at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.net.SocketInputStream.read(SocketInputStream.java:182) at java.io.FilterInputStream.read(FilterInputStream.java:66) at org.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(Unkno wn Source) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transform erIdentityImpl.java:484) Please advice me what are the changes I want to do in my xbean.xml and servicemix.xml. Thanks in advance. Thanks&Regards Brahma Naidu This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful.
