Hey Sorin,

that looks correct to me and this should work as we provide a converter from
StringResult to String.
 We've also added a converter now that can convert directly from
StringResult to a StreamSource which you could try but since the String did
not work I don't expect that will.
Could you add a log element that logs the result of the formatter too:
<log message="After SmooksDataFormat: ${body}"/>

Are you using the same example that you posted previously to the Smooks user
list? If not, could you send me an updated version and I'll try this out
tomorrow.

Regards,

/Daniel

Can you try adding a log element to the route make sure the Smooks

2010/8/25 Sorin Silaghi <sorin7...@gmail.com>

> 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 <claus.ib...@gmail.com>
> 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 <sorin7...@gmail.com>
> 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
> >
>

Reply via email to