Getting Empty Values in Soap Request

omgayathri
Kilo Explorer

We are integrating SNOW with third party tool using soap message. We creating the incident by triggering the business rule. The incident getting created in third party tool but field mapping is not happened. We have put logs in our business rule and checked but we are getting null values in request body. We are not sure about where we are lacking.

var s = new sn_ws.SOAPMessageV2('Avaya Stage', 'CreateIncident');

gs.log('trigger1' +current.sys_id);

s.setStringParameter('WorkInfo_Notes',current.work_notes);

s.setStringParameter('Notes',current.description);

var response = s.execute();

var responseBody = response.getBody();

var status = response.getStatusCode();

var requestbody = s.getRequestBody();

gs.log('cre inc request body'+ requestbody);

Any help highly appreciate

1 REPLY 1

lloydgomes
ServiceNow Employee
ServiceNow Employee

There is a setting


glide.soap.outbound.debug


which you can try turning on (set to true). The request body only gets created when you send the request over the wire you will see something like


Prepared requestBody for soap request: in the log



I would suggest trying this out in background script first with some hard coded values and then worry about putting it in the businsess rule.



Also what is the status code you are getting back? Can you include your response body text?