difference between getXML() and getXMLWait()?

ram2497
Tera Contributor

difference between getxml() and getxmlwait()?

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Hi Ram,

 

getXMLWait() - Wait till the time we get input from server & then move ahead.

For instance when you are trying to retrieve value of the field & after getting value then only it should proceed to next step like comparing it with user input.

 

getXML() - If you are retrieving some data from server and next tasks does not depend on what you are retrieving from server. Ideally, used so as to avoid any performance load.

 

For additional information you may refer link.

 

Thanks,

Jaspal Singh

 

Hit Helpful or Correct on the impact of response.

 

 

 

View solution in original post

5 REPLIES 5

Sebastian L
Mega Sage

Basics: getXMLWait is synchronous, while getXML() is asynchrorous. 

 

For further understanding look at these answers, which describes it quite well: https://community.servicenow.com/community?id=community_question&sys_id=fcc90be5db5cdbc01dcaf3231f9...


Best regards,
Sebastian Laursen

Naveen4
Kilo Guru

Hi,

 

getxml() : asynchornous call and getxmlwait() : synchronus call

 

getxml():

it will proceed with the other actions with out depending on the result.

 

getxmlwait() :

it will wait fofor the result and after that only it will execute the other statements.

 

Regards,Naveen

 

 

 

 

 

SNOW User8
Giga Guru

Please refer this link https://community.servicenow.com/community?id=community_question&sys_id=fcc90be5db5cdbc01dcaf3231f9619f2

It should help

Jaspal Singh
Mega Patron
Mega Patron

Hi Ram,

 

getXMLWait() - Wait till the time we get input from server & then move ahead.

For instance when you are trying to retrieve value of the field & after getting value then only it should proceed to next step like comparing it with user input.

 

getXML() - If you are retrieving some data from server and next tasks does not depend on what you are retrieving from server. Ideally, used so as to avoid any performance load.

 

For additional information you may refer link.

 

Thanks,

Jaspal Singh

 

Hit Helpful or Correct on the impact of response.