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

Error while calling REST service

Highlighted
Level 1

Error while calling REST service

Hi,

I am getting error while calling thing service . While its working fine for locally deployed service . I am getting below error

Wrapped java.net.UnknownHostException: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server (dev1.tcupiot.com) Cause: This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server (dev1.tcupiot.com)

The service i am trying is :-

var params1 = {

proxyScheme: undefined /* STRING */,

headers:{

  "Accept": "*/*",

  "tenantId": "12345"

},

ignoreSSLErrors: true /* BOOLEAN */,

useNTLM: undefined /* BOOLEAN */,

workstation: undefined /* STRING */,

useProxy: undefined /* BOOLEAN */,

withCookies: undefined /* BOOLEAN */,

    url:"http://xxxx.com/app/user5/XXXservice/Alert/Query?eventDateTime=YYYY-MM-dd" /* STRING */,

    //url:"http://localhost:8081/XXXXservice/Alert/Query?eventDateTime=2016-06-12%2C2018-10-15",

    timeout: undefined /* NUMBER */,

proxyPort: undefined /* INTEGER */,

password: undefined /* STRING */,

username: undefined /* STRING */

};

// result: JSON

var data = Resources["ContentLoaderFunctions"].GetJSON(params1);

var params2 = {

infoTableName: "alertTable" /* STRING */,

dataShapeName: "AlertDataShape" /* DATASHAPENAME */

};

var jsonTable = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params2);

for(var i=0;i<data.array.length;i++)

{

jsonTable.AddRow({vehicleRegNo:data.array.vehicleRegNo,

                  eventTypeName:data.array.eventTypeName,

                  eventLocDescription:data.array.eventLocDescription,

                 eventDatetime:data.array.eventDatetime,

                  speed:data.array.speed,

                  description:data.array.description

                 });

}

result = jsonTable;

Tags (1)
1 REPLY 1

Re: Error while calling REST service

This looks like a DNS error to me -- have you tried using a fully qualified domain name? Does it respond to a ping from the TWX server? Are the DNS settings correct?