Quantcast

Servicemix 1.1.0 / camel-ftp 1.6.1 / ActiveMQ 5.2.0

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Servicemix 1.1.0 / camel-ftp 1.6.1 / ActiveMQ 5.2.0

londonukm
This post has NOT been accepted by the mailing list yet.
Hi,

I have a process that takes a message from an Active MQ queue, does some processing and then wants to put the Message.Body onto an FTP server. I wrote the following:

        from("activemq:queue:ftplondon.INCOMING")
                .process(singularityProcessor)
        .recipientList(header(Constants.HEADER_FTP_ENDPOINT));

The message is processed correctly and contains the payload. The connection to the FTP server is also made correctly, however at the point of transfer an error occurs.

       org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: class org.apache.camel.impl.DefaultMessage to the required type: java.io.InputStream with value Message: {message=<FSAMarketsFeed xmlns:cmn="http://www.fsa.gov.uk/XMLSchema/FSAFeedCommon-v1-2" xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="....

I tried to resolve this by manually converting the body to an InputStream as follows:

        from("activemq:queue:ftplondon.INCOMING")
        .convertBodyTo(InputStream.class)
        .recipientList(header(Constants.HEADER_FTP_ENDPOINT));

however this has had no effect and I still get the same error.

Any help would be greatly appreciated.

Many Thanks

Graham
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Servicemix 1.1.0 / camel-ftp 1.6.1 / ActiveMQ 5.2.0

londonukm
I managed to get this working by using

     convertBodyTo(String.class)

thanks

Graham
Loading...