Hi,
My comment inline
On 2011-11-24, at 下午11:05, Ashish wrote:
Hi,
I am new to servicemix. trying to write a simple example in which a
file
contents are copied from a directory to a jms queue which in turn
transfers
it to another directory. The xml file is as follows:-
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:osgi="http://www.springframework.org/schema/osgi"
xmlns:file="http://servicemix.apache.org/file/1.0"
xmlns:jms="http://servicemix.apache.org/jms/1.0"
xmlns:ifm="http://www.fico.com"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://servicemix.apache.org/file/1.0
http://servicemix.apache.org/file/1.0/servicemix-file.xsd
http://servicemix.apache.org/jms/1.0
http://servicemix.apache.org/jms/1.0/servicemix-file.xsd">
At least this is incorrect
it should be
http://servicemix.apache.org/jms/1.0/servicemix-jms.xsd
but not
http://servicemix.apache.org/jms/1.0/servicemix-file.xsd
Btw, you should post this question to Servicemix user mailling list,
as this is a Servicemix specific question.
Freeman
<bean class="org.apache.servicemix.common.osgi.EndpointExporter" />
<bean id="propertyConfigurer"
class
=
"org
.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
/>
<manifest>
Bundle-Version = 1.0.0
Bundle-Name = Data Handler Service Application
Bundle-SymbolicName = org.apache.servicemix.examples.filemover
Bundle-Description = An example which reads a file from an input
folder and writes it to an output folder
Bundle-Vendor = [email protected]
Require-Bundle = servicemix-file
</manifest>
<file:poller service="ifm:file"
endpoint="poller"
autoCreateDirectory="true"
file="C:/dh-in"
targetService="ifm:JmsTarget"
period="8000"
delay="4000"
deleteFile="true"
recursive="true">
<property name="marshaler">
<bean
class
="org.apache.servicemix.components.util.SimpleFlatFileMarshaler" />
</property>
</file:poller>
<file:sender service="ifm:file"
endpoint="sender"
append="false"
autoCreateDirectory="true"
directory="C:/dh-out">
<property name="marshaler">
<bean
class
="org.apache.servicemix.components.util.SimpleFlatFileMarshaler" />
</property>
</file:sender>
<jms:consumer service="ifm:JmsSource" endpoint="jms"
targetService="ifm:file" targetEndpoint="sender"
destinationName="queue/FileJmsMover"
connectionFactory="#connectionFactory" />
<jms:provider service="ifm:JmsTarget" endpoint="jms"
destinationName="queue/FileJmsMover"
connectionFactory="#connectionFactory" />
<bean id="connectionFactory"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName"
value="java:/XAQueueConnectionFactory"/>
<property name="lookupOnStartup" value="true"/>
</bean>
</beans>
***********
While deploying this I am getting this error in log - "The matching
wildcard
is strict, but no declaration can be found for element
'jms:consumer'". any
help on how to solve this will be highly appreciated.
Thanks in advance,
aashish
--
View this message in context:
http://camel.465427.n5.nabble.com/How-do-i-use-a-JMS-Consumer-in-Camel-DSL-tp475447p5020399.html
Sent from the Camel - Users mailing list archive at Nabble.com.
---------------------------------------------
Freeman Fang
FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com