Pardon my ignorance but do you mean like this:
<route>
<from
uri="jbi:endpoint:http://servicemix.apache.org/samples/bridge/marshaled/edi-endpoint"/>
<unmarshal ref="myEdifact"/>
<convertBodyTo type="java.lang.String"/>
<to
uri="nmr:{http://servicemix.apache.org/samples/bridge}ftp:sender"/>
</route>
because that doesn't work.
On Wed, Aug 25, 2010 at 5:47 PM, Claus Ibsen <[email protected]> wrote:
> You can most likely just convert to String before sending to NMR
> <convertBodyTo type="String"/>
>
>
>
>
> On Wed, Aug 25, 2010 at 4:22 PM, Sorin Silaghi <[email protected]> wrote:
>> Hello,
>>
>>
>> I've been trying out the camel-integration component that
>> Daniel Bevenius started from the Smooks project. If you don't know
>> about it here's where you can find it:
>> https://svn.codehaus.org/milyn/workspaces/tfennelly/camel-integration
>>
>> The problem I had is it didn't work in Servicemix with the ftp
>> endpoint. It seems that the problem was with the object type that was
>> returned by the unmarshal method in SmooksDataFormat. What Smooks
>> normally returns is an implementation of javax.xml.transform.Result
>> and what was needed is javax.xml.transform.stream.StreamSource.
>>
>> So my question is where should this type conversion take place
>> exactly? I'm not that familiar with Camel or Servicemix. I thought I'd
>> send this to the Camel mailing list because the problem is related to
>> this camel-integration component but let me know if I have to move
>> this to the Servicemix mailing list.
>>
>> Bellow is the content of my camel-context.xml file:
>>
>> <bean id="myEdifact"
>> class="org.milyn.smooks.camel.dataformat.SmooksDataFormat2">
>>
>> <constructor-arg><value>file:/home/sorin/work/EDIGrid/apache-servicemix-4.2.0/etc/smooks-config.xml</value></constructor-arg>
>>
>> <constructor-arg><value>org.milyn.payload.StringResult</value></constructor-arg>
>> <constructor-arg><value>result</value></constructor-arg>
>> </bean>
>>
>> <camelContext xmlns="http://camel.apache.org/schema/spring">
>> <route>
>> <from
>> uri="jbi:endpoint:http://servicemix.apache.org/samples/bridge/marshaled/edi-endpoint"/>
>> <unmarshal ref="myEdifact"/>
>> <to
>> uri="nmr:{http://servicemix.apache.org/samples/bridge}ftp:sender"/>
>> </route>
>> </camelContext>
>>
>>
>> thank you,
>> Sorin.
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>