You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by cmoulliard <cm...@gmail.com> on 2009/01/16 14:26:00 UTC

How can a DataFormat class becomes springable ?

Hi,

I would like to know what must be done in order to allow the camel-bindy
component becomes 'springable' and that we can use it through by ex the
following spring xml syntax :

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
       http://activemq.apache.org/camel/schema/spring
       http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
       
    <bean id="bindyDataformat"
class="org.apache.camel.bindy.csv.BindyDataFormat">
		<constructor-arg type="java.lang.String"
value="org.apache.camel.bindy.model"/>
	</bean>

  <camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
    <package>com.xpectis.osgi.bindy</package>
    <route>
    	<from uri="file://src/test/data/?noop=true" />
    	<unmarshall id="bindyDataformat"/>
    	<to uri="direct:start" />
    </route>
  </camelContext>

</beans>

-----
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: http://www.nabble.com/How-can-a-DataFormat-class-becomes-springable---tp21499221s22882p21499221.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How can a DataFormat class becomes springable ?

Posted by cmoulliard <cm...@gmail.com>.
I will have a look.

Many thanks 

Have you had a look to my osgi question about convention ?


willem.jiang wrote:
> 
> Hi Charles,
> 
> You can take a look at the files in
> trunk\camel-core\src\main\java\org\apache\camel\model\dataformat.
> We use JAXB annotation to build up the xml schema.
> When you add a new bindyDataformat, please also update the jaxb.index in
> trunk\camel-core\src\main\resources\org\apache\camel\model\dataformat
> 
> Hope these information can help you :)
> 
> Willem
> 
> cmoulliard wrote:
>> Hi,
>> 
>> I would like to know what must be done in order to allow the camel-bindy
>> component becomes 'springable' and that we can use it through by ex the
>> following spring xml syntax :
>> 
>> <beans xmlns="http://www.springframework.org/schema/beans"
>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>        xsi:schemaLocation="
>>        http://www.springframework.org/schema/beans
>>        http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>>        http://activemq.apache.org/camel/schema/spring
>>        http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>>        
>>     <bean id="bindyDataformat"
>> class="org.apache.camel.bindy.csv.BindyDataFormat">
>> 		<constructor-arg type="java.lang.String"
>> value="org.apache.camel.bindy.model"/>
>> 	</bean>
>> 
>>   <camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
>>     <package>com.xpectis.osgi.bindy</package>
>>     <route>
>>     	<from uri="file://src/test/data/?noop=true" />
>>     	<unmarshall id="bindyDataformat"/>
>>     	<to uri="direct:start" />
>>     </route>
>>   </camelContext>
>> 
>> </beans>
>> 
>> -----
>> Charles Moulliard
>> SOA Architect
>> 
>> My Blog :  http://cmoulliard.blogspot.com/
>> http://cmoulliard.blogspot.com/  
> 
> 
> 


-----
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: http://www.nabble.com/How-can-a-DataFormat-class-becomes-springable---tp21499221s22882p21500408.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How can a DataFormat class becomes springable ?

Posted by Willem Jiang <wi...@gmail.com>.
Hi Charles,

You can take a look at the files in
trunk\camel-core\src\main\java\org\apache\camel\model\dataformat.
We use JAXB annotation to build up the xml schema.
When you add a new bindyDataformat, please also update the jaxb.index in
trunk\camel-core\src\main\resources\org\apache\camel\model\dataformat

Hope these information can help you :)

Willem

cmoulliard wrote:
> Hi,
> 
> I would like to know what must be done in order to allow the camel-bindy
> component becomes 'springable' and that we can use it through by ex the
> following spring xml syntax :
> 
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xsi:schemaLocation="
>        http://www.springframework.org/schema/beans
>        http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>        http://activemq.apache.org/camel/schema/spring
>        http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>        
>     <bean id="bindyDataformat"
> class="org.apache.camel.bindy.csv.BindyDataFormat">
> 		<constructor-arg type="java.lang.String"
> value="org.apache.camel.bindy.model"/>
> 	</bean>
> 
>   <camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
>     <package>com.xpectis.osgi.bindy</package>
>     <route>
>     	<from uri="file://src/test/data/?noop=true" />
>     	<unmarshall id="bindyDataformat"/>
>     	<to uri="direct:start" />
>     </route>
>   </camelContext>
> 
> </beans>
> 
> -----
> Charles Moulliard
> SOA Architect
> 
> My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/