Hello,

I already have some experience wit jave but I'm new to camel.

So at the moment I have some problems with the starting. I think I
understand the basics of camel (I'm reading "Camel in action") but still not
sure how to start. Hopefully someone can help me. 

What I want to do.

I want to download a json from a REST endpoint
after this I need to transform it into an xml file while I also add some
static fields to it.
After this I need to send this xml file to an ftp server

So lets say I want to download a json from
www.mypage.com/stuff/my-stuff with a GET

The json looks like the following

{
   id:1
   name: Hello World
}

I want to transform this in the following xml structure

<message>
  <id>1</id>
  <name>Hello World</name>
  <staticfield>1.2.3</staticfield>
</message


after this I want to send it to the ftp server
www.myftpServer.com/suppage?username=admin&password=secret with PUT

As far as I understood it should be something like

from("rest:get:www.mypage.com/stuff/my-stuff)
to("ftp:www.myftpServer.com/suppage?username=admin&password=secret")
.process(new MyTransformationBean())
;

The Spring MyTransformationBean needs a public method like

public ?? map(MyObjectFromJson input){
  // TODO Here happens one miracle
}

Is this so at least from a 10.000 feet view ok?



--
View this message in context: 
http://camel.465427.n5.nabble.com/beginner-download-json-transform-to-xml-send-to-ftp-tp5764007.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to