Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-6816

Camel Weather - 301 Moved Permanently

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • Camel
    • None
    • % %

      Camel Weather component loads geographical location from https://freegeoip.io/json/. This API was moved to another URL so the component is broken.

      Exception in thread "SpringOsgiExtenderThread-2" org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: 
      Endpoint[weather://foo?appid=c30bc84b55d8bcaab1e44a87ed61292d]. Reason: org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
      
      curl http://freegeoip.io/json/
      <html>
      <head><title>301 Moved Permanently</title></head>
      <body bgcolor="white">
      <center><h1>301 Moved Permanently</h1></center>
      <hr><center>nginx/1.11.8</center>
      </body>
      </html>
      
      curl https://freegeoip.io/json/
      {"ip":"88.101.155.115","country_code":"CZ","country_name":"Czechia","region_code":"10","region_name":"Hlavni mesto Praha","city":"Prague","zip_code":"130 00","time_zone":"Europe/Prague","latitude":50.0833,"longitude":14.4667,"metro_code":0}
      

      As you can see in code snippets above freegeoip service was mooved to the new URL. Camel Weather component should reflect this change.

            acosenti Andrea Cosentino
            jbouska@redhat.com Jan Bouska
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: