You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2009/08/31 21:03:39 UTC

Re: Spring Remoting with File Component - Hopefully someone has a quick answer :)

On Thu, Aug 27, 2009 at 5:30 PM, James Chrystal<ja...@gmail.com> wrote:
>
> I'm using Camel 1.6.1 - I want to use Spring remoting with the File
> Component, however, I'm getting a NoTypeConversionAvailableException.  I'm
> curious if it's possible to make this work.
>
> This works fine using JMS - the MyServiceInterface accepts an Object which
> implements Serializable, and it creates a binary message on the queue.
>
>    <camel:camelContext id="camel" />
>    <camel:template id="camelTemplate" />
>
>    <bean id="jms"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>        <property name="brokerURL" value="tcp://localhost:61616"/>
>    </bean>
>
>    <camel:proxy
>        id="myService"
>        serviceInterface="MyServiceInterface"
>        serviceUrl="jms://queue:my_queue" />
>
>
> However, I want to drop the queue and use the file system:
>
>    <camel:camelContext id="camel" />
>    <camel:template id="camelTemplate" />
>
>    <camel:proxy
>        id="myService"
>        serviceInterface="MyServiceInterface"
>        serviceUrl="file://c:/jim" />
>
> This throws a NoTypeConversionAvailableException:
>
> No type converter available to convert from type: class
> org.apache.camel.component.file.FileMessage to the required type:
> java.io.InputStream
>
> So, it seems that Camel can serialize a message to a JMS Endpoint, but not
> to a File Endpoint.  Can anyone verify this or provide me with any
> additional hints?  It would be greatly appreciated.

The JMS case I think have added type converters so it can be used with
spring remoting out of the box.

The file based may need the type converter it reports as missing.
You can add this converter yourself.
http://camel.apache.org/type-converter.html




>
> - Jim
>
>
> --
> View this message in context: http://www.nabble.com/Spring-Remoting-with-File-Component---Hopefully-someone-has-a-quick-answer-%3A%29-tp25171418p25171418.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus