How to get SOAP response status?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2014 10:32 AM
Hi All,
I am working on one of the integration with third-party tool. For instance in case of SN Soap integration. When i invoke the web service and get the response can i figure out if that transaction was SUCCESS or FAILURE ? One way to figure out is by going to tags (XML response) and searching if that tag contains any Correlation ID. But is their any way by which i can get httpStatus of transaction like soap-fault, success etc ? Below sample response doesn't contain such status:
<?xml version='1.0' encoding='UTF-8'?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><insertResponse><sys_id>970f1d638ccd71007f4447f85bcbcb08</sys_id><number>INC0010121</number></insertResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
PS: .getHttpStatus(); method is returning "undefined".
Thanks in advance,
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2014 08:25 PM
Hi Manoj,
The error_string field on your ECC Queue should hold the HTTP Response status, and the Business Rule 'ECC Queue - mark outputs state' running on the queue is responsible for this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-25-2014 03:41 AM
Hi Manoj,
After setting all the parameters in your XML when you are posting you soap message
s.post(true);
you can check the response in the same script. Just check for getHttpStatus.
if (s.getHttpStatus() == '200')
If it is 200 you are getting proper response from the system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2015 09:37 AM
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2015 01:56 AM
Hi colleagues,
I'm using the Help the Help Desk Login Script as template to insert data to a custom table with SOAP.
Help the Help Desk Login Script - ServiceNow Wiki
I've launched it from Windows Command Line.
I've modified the script, and it works fine, it insert data on my custom table, but I don't get the '200' response from Service-Now instance.
If I try to write on 'ecc_queue' as the original script does, I get the response so I guess that anywhere there is a script that make the response, but I don't find it.
Anyone knows hot to fix this or how to send the response from SNow ?
Thanks and best regards.