Debugging web services in ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2015 03:11 PM
During development of integrations, it is frustrating to see your web service request is failing for reasons unknown. You would like to see what is going under wraps to get better idea of whats going on. ServiceNow provides different flavors of web services (inbound, outbound)(REST,SOAP).
How do we know what is going on with my request. how are headers coming through. what is the request body like and what are responses generated.
Are there any limitations
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2015 07:51 PM
Hi Venkata Koya,
Please see below link for instructions on debugging REST services:
I have already set the property tot true. However, I cannot seem to find the logs. Have tried running the REST service though the explorer and through script but to no avail. Do you have any updates on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2015 09:01 PM
In case of inbound REST API, there is glide property called glide.rest.debug. Setting it to True will start logging more details about REST transactions.
Where can i see these logs: All these debug logs are written to system log. These are different from transaction logs or db logs. As admin, ou can view system logs in instance using Log file Downloader, Log file browser.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2015 09:15 PM
Hi Venkata Koya
This is for Inbound REST. How about the Outbound REST? Is it included in the debug logs? I have browsed already the Node Loge File Browser and cannot find any related info about my rest service. Kindly help..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2015 09:32 PM
Hi,
On Fuji instance, there is a different debug property available.
Debug property for Outbound REST : glide.rest.outbound.debug
Debug property for Outbound HTTP : glide.http.log_debug
Enabling this property and using RESTMessageV2 API - ServiceNow Wiki, will log more details about outbound request. Also, there are couple more properties which can be enabled to log details about outbound HTTP communication
Similar to other debug logs, these are also found in system logs
If you are on older instances, unfortunately there isn't much of logging available