Outbound SOAP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2016 01:53 PM
Hello all,
I'm playing around with SOAP messages for the first time. I've set up an outbound message from our DEV instance to our TEST instance. It works but I'm not clear conceptually on what actually happens, in terms of timeout etc. So I have this business rule:
GenerateSoapMessage();
gs.log('JW SOAP Test BRULE running!');
function GenerateSoapMessage(){
var s = new SOAPMessage('JWTest_1', 'insert');
s.setParameter('u_my_first_string_field',current.u_latest_work_instruction);
var response = s.post();
gs.log('response is: ' + response);
}
and this is successfully inserting a new record on the target table in TEST, populating a field called 'u_my_first_string_field' with the value of the field 'current.u_latest_work_instruction' in DEV. I've been looking at the value of 'response' in different scenarios - eg after deliberately making it so that basic authentication fails, or the user does not have sufficent permissions to insert the new record. Things are working as I'd expect them. But my question is, how long does the system wait for a response? And before that, how many times or for how long does the 'source' system attempt to send the outbound message? Any pointers, greatly appreciated.
Jamsta u_my_first_string_field
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2016 02:07 PM
Jamie,
My understanding is the system will make one call if your triggering the soap message once. The timeouts are listed on wiki link. Long-Running SOAP Request Support - ServiceNow Wiki Timeout by default is 100 seconds..
One tip i use, is all my outbound calls SOAP or REST are async. Link below will give you a good starting point for async calls.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2016 01:17 PM
Thank you Patrick. The link you've included is to the Developers area - did you mean to include a specific link re async calls?
I notice 'glide.soap.request_processing_timeout' is one of those properties I would have to create. In the product documentation, the section on this property begins 'If you do expect to process large numbers of SOAP records in a single transaction...' and my thoughts are that I'm only expecting one SOAP record in my case! So again for my basic understanding -
If I generate the single call, what then actually happens in terms of waiting for the response (without the property set)? For instance, if the destination system had mysteriously disappeared from the cloud, what would happen?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2016 02:04 PM
Looks like I can't link you to API in the developer site. Anyway, go to developer site, click api server, and nav to soapv2. It will show you all the methods you can use.
glide.soap.request_processing_timeout was in my personal instance. The others you will need to add. I never had an issue with timeout. I know if SN doesnt get a reply in x time it will through a timeout error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2016 05:34 PM
Thank you Patrick.