Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

Problem in Weather App

Regular Member

Problem in Weather App


i've got a problem with the service GetYahooWeatherInformation.

When i test the service tw said me the exception: Wrapped org.apache.http.NoHttpResponseException: failed to respond Cause: failed to respond.

Can anyone help me??

Tags (2)

Re: Problem in Weather App

Hello, what does the REST call to yahoo look like, the one which gives you this error (or rather, the part of the service which actually attempts to call Yahoo). A lot of Yahoo's weather REST API is deprecated. There is documentation demonstrating how to retrieve weather information from Wunderground located here:

Hope this helps!


Re: Problem in Weather App


As mentioned in, i created a a mashup, when i am trying to execute, i go the following error.

17:06:34 ERROR - Error in invoking service DynamicThingTemplates_WeatherTemplate, GetYahooWeatherInformation, Things, Beta, Services, GetYahooWeatherInformation. Error from the server: "Wrapped org.apache.http.conn.HttpHostConnectException: Connect to [] failed: Connection timed out: connect Cause: Connect to [] failed: Connection timed out: connect".

My service script is as follows:

// Need to make a free account to get this key

var apiKey = "381603bc1002b5ce";

var temperature;

var humidity;

  //Inputted location needs to be valid lat, long: 40.7127, 74.0059

if(location != null){

     var test = location + " ";

    var arrayLocations = test.split(",");

    var lat = arrayLocations[0];

    var long = arrayLocations[1];

     var prm = {

        url: ""+apiKey+"/conditions/q/"+lat+","+long+".json",timeout: 60000


     var json = Resources["ContentLoaderFunctions"].PostJSON(prm);

  try {

        temperature = parseInt(json.current_observation.temp_f);

        humidity = parseInt(json.current_observation.relative_humidity);

        me.Temperature = temperature;

        me.Humidity = humidity;

        result = "Success. Properties are updated.";

          } catch(err) {

        logger.error("Could not parse temperature and humidity for location: " + location

           + ". All valid Longitudes and Latitudes values must have decimal points"                      + " and be located where weather measurements are commonly taken (near cities).");

        result = "Failed. Check Script Logs";



But when i am trying to enter the URL via chrome browser (,77.50030517578125.j...)

i got the results properly in JSON format.

But when i am trying to execute from mashup, the got the error.

can anyone help me to resolve the issue.

Thanks in Advance

Gnanamuthu Lucas


Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.