Here are the configurations-

File poller-
<beans xmlns:file="http://servicemix.apache.org/file/1.0";
        
xmlns:tutorial="urn:org:apache:servicemix:tutorial:camel" 
                   xmlns:tut="urn:servicemix:tutorial">
              <!-- add the sender endpoint here -->
              <file:sender service="tut:file" 
                           endpoint="sender"
             directory="C:\Temp" >
              </file:sender>
              <!-- add the poller endpoint here -->    
                        <file:poller service="tut:file" 
                                         endpoint="poller"
                                         file="C:\Test" 
                                         targetService="tutorial:jms">
        <property name="filter">
        <bean class="org.apache.commons.io.filefilter.WildcardFilter">
                <constructor-arg value="*.pdf" />
        </bean>
        </property>
                                                                  

                        </file:poller>

            </beans>


JMS:
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns:jms="http://servicemix.apache.org/jms/1.0";
       xmlns:tutorial="urn:org:apache:servicemix:tutorial:camel"
       xmlns:amq="http://activemq.org/config/1.0";>

    <jms:provider service="tutorial:jms"
                  endpoint="provider" 
                  destinationName="tutorial.camel.queue"
                  connectionFactory="#connectionFactory" />

    <jms:consumer service="tutorial:jms"
                  endpoint="consumer"
                  destinationName="tutorial.camel.queue"
                  connectionFactory="#connectionFactory"
                  targetService="tutorial:jms"
                  targetEndpoint="consumer" />
        
    <amq:connectionFactory id="connectionFactory"
brokerURL="tcp://localhost:61616" />

</beans>

Xbean:
<beans xmlns:bean="http://servicemix.apache.org/bean/1.0";
       xmlns:uploadWS="urn:servicemix:tutorial">

  <bean:endpoint service="uploadWS:myBean" endpoint="myBean"
bean="#myBean"/>
  <bean id="myBean" class="com.thirdpillar.uploadWS.abc"/>
  
</beans>

-----Original Message-----
From: Guillaume Nodet [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2008 5:22 PM
To: [email protected]
Subject: Re: Unable to read files in my xbean

Could you please provide the xbean configurations and the code of your
custom bean ?

On Fri, Sep 5, 2008 at 1:49 PM, Richa Khurana
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am a newbie to servicemix and camel.. am using a filepoller to load
> files from a source folder and send them to a JMS queue and then to my
> xbean. it reaches upto my xbean but i cant read the file, it throws
the
> below exception
>
>
>
> DEBUG - SedaQueue                      -
> [EMAIL PROTECTED] dequeued
> exchange: InOnly[
> id: ID:172.16.80.75-11c324d629e-8:0
> status: Active
>   role: provider
>   endpoint: myBean
> in: Unable to display: java.io.IOException: Stream closed
>
> Thanks,
> Richa
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Reply via email to