{"id":6022,"date":"2016-12-12T11:07:29","date_gmt":"2016-12-12T16:07:29","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=6022"},"modified":"2016-12-12T11:07:29","modified_gmt":"2016-12-12T16:07:29","slug":"camel-route-to-consume-external-web-service","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2016\/12\/12\/camel-route-to-consume-external-web-service\/","title":{"rendered":"Camel route to consume external web service"},"content":{"rendered":"<p>I thought this was pretty difficult to find a very simple working example.  The following works as an example of a polling consumer integration pattern&#8230;<\/p>\n<pre>\r\n  <route id=\"callExternalHTTP\">\r\n    <from uri=\"timer:\/\/simpleTimer?period=30000\"\/>\r\n    <to uri=\"http:\/\/externalhost:8080\/api\/v1\/getQuote\"\/>\r\n    <to uri=\"file:out\/ws\"\/>\r\n  <\/route>\r\n<\/pre>\n<p>This will do a GET of the URL listed every 30 seconds, and write the content to a directory.  This is not of course production ready, but does show the connectors to get it working.<\/p>\n<p>A more complete example which includes business logic is available at <a href=http:\/\/camel.apache.org\/polling-consumer.html target=_blank>http:\/\/camel.apache.org\/polling-consumer.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I thought this was pretty difficult to find a very simple working example. The following works as an example of a polling consumer integration pattern&#8230; This will do a GET of the URL listed every 30 seconds, and write the&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2016\/12\/12\/camel-route-to-consume-external-web-service\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[70,69],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/6022"}],"collection":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/comments?post=6022"}],"version-history":[{"count":5,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/6022\/revisions"}],"predecessor-version":[{"id":6115,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/6022\/revisions\/6115"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=6022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=6022"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=6022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}