Setting a SOAP timeout can be done by using the out of the box property ‘glide.soap.request_processing_timeout’. By default, this is set to 60 seconds.
Now ideally, anything that takes longer than that should be built out with some sort of asyncrhonous call, but sometimes it’s not possible and you need to increase the timeout.
However, you don’t really want to increase the timeout for every SOAP call just to resolve an issue with one SOAP call. That’s a real hammer to crack a nut situation. Fortunately, there’s an easy way to override this within ServiceNow which I have been told about.
All you need to do is within the SOAP call, add a new header called ‘x-client’. The value of this header can be whatever you like, but for this example we’ll add the value ‘examplesoap’.
Now all you have to do is create a new system property called ‘glide.soap.request_processing_timeout.examplesoap’, set it to an integer and set it to a higher timeout than the standard property. ServiceNow will automatically take this property as the timeout. Simple as that really.
You can have as many different timeouts as you like for each type of SOAP call as long as you have its own system property as above.