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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Error while calling REST service

pmishra-4
1-Newbie

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;

1 REPLY 1
jamesm1
5-Regular Member
(To:pmishra-4)

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?

Top Tags