I want to save the content from a localhost(json data) Example:
"id": 1,
"prename": "Noel",
"surname": "Reyes",
"dateOfBirth": "1988-09-07",
"birthPlace": "Bad Ems",
"gender": "M"}
) in a txt.file (C:\inputFolder in Example.txt). Thats my code:
from("timer://foo?period=5s")
.to("http4://localhost:8091/customers/")
.log("Test3 ${body}")
.to("file:C:/inputFolder/Example.txt")
;
But: My route1 started and is consuming from localhost but it does not save it in the textfile.
main] DefaultCamelContext INFO Apache Camel 2.22.2 (CamelContext: camel-1) is starting
[ main] ManagedManagementStrategy INFO JMX is enabled
[ main] DefaultTypeConverter INFO Type converters loaded (core: 195, classpath: 15)
[ main] HttpComponent INFO Created ClientConnectionManager org.apache.http.impl.conn.PoolingHttpClientConnectionManager@24c4ddae
[ main] DefaultCamelContext INFO StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
[ main] DefaultCamelContext INFO Route: route1 started and consuming from: timer://foo?period=5s
[ main] DefaultCamelContext INFO Total 1 routes, of which 1 are started
[ main] DefaultCamelContext INFO Apache Camel 2.22.2 (CamelContext: camel-1) started in 2.945 seconds
Process finished with exit code 0
Can you help me?