Topic
6 replies Latest Post - ‏2012-10-10T08:18:04Z by muthamilarasan
muthamilarasan
muthamilarasan
20 Posts
ACCEPTED ANSWER

Pinned topic [Solved] Problem with google places Api in adapters

‏2012-10-08T06:25:19Z |
Hi,
While using google places API to fetch the List of Restaurants in work light adapter. I got different errors as specified in the following link. when i modified the code as speciified in the link im still getting the error

"Invocation of procedure 'getPlaces' has timed out after 30 sec."

PFA for the Sample adapter i'm working on and this is the link i used as reference

http://stackoverflow.com/questions/11611058/how-to-make-https-requests-with-serverside-javascript-using-worklight
Thanks

Muthamilarasan.D
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Problem with google places Api in adapters

    ‏2012-10-09T07:35:41Z  in response to muthamilarasan
    Does the information in the following thread help you?
    http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14871806

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • muthamilarasan
      muthamilarasan
      20 Posts
      ACCEPTED ANSWER

      Re: Problem with google places Api in adapters

      ‏2012-10-09T09:07:02Z  in response to IdanAdar
      Hi Idan,

      I am getting the following error, when invoking the adapter procedure.

      Http request failed: java.net.NoRouteToHostException: No route to host
      Caused by: java.net.NoRouteToHostException: No route to host
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Problem with google places Api in adapters

    ‏2012-10-09T12:31:49Z  in response to muthamilarasan
    Hi,

    Does this mean you have changed the timeout properties?
    Have you verified that the address you are using in valid and pointing to the right location? ...

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • muthamilarasan
      muthamilarasan
      20 Posts
      ACCEPTED ANSWER

      Re: Problem with google places Api in adapters

      ‏2012-10-10T06:26:04Z  in response to IdanAdar
      Hi Idan,

      I am getting the correct response in browser and native iPhone application.
      While using https request in adapters i am getting the error.

      Please Find the places api below.
      https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=500&types=atm&sensor=false&key=AIzaSyBMu4hk2lN-L7XvuCKCCLOVhI2mwwAERDA
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: Problem with google places Api in adapters

    ‏2012-10-10T06:55:30Z  in response to muthamilarasan
    Hi,

    Judging based on your provided adapter in the Zip file, it seems to me that you have not fully followed the solution from Stackoverflow.
    In the adapter XML, you are pointing to HTTP protocol and 8080 port, while it is mentioned to use HTTPS protocol and 443 port.

    Please review again the solution provided in Stackoverflow and make sure you follow it.

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • muthamilarasan
      muthamilarasan
      20 Posts
      ACCEPTED ANSWER

      Re: Problem with google places Api in adapters

      ‏2012-10-10T08:18:04Z  in response to IdanAdar
      Thanks Idan, Changing the port 8080 to 443 working.