How to print the request Body in SOAP Message?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2022 08:41 AM
Hi all,
Building the SOAP outbound in scoped application, Please guide me to put log the requestBody before hitting the endpoint.
Using the below code geeting null value
var s = new sn_ws.SOAPMessageV2('Some string','somestring');
var requestBody = s.getRequestBody();
gs.info('requestBody ' + requestBody);
output: getting null instead of body
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2022 09:00 AM
Hi,
You can try to print the request body once you add the line which executed the API i.e. after
var response = s.execute();
Please mark reply as Helpful/Correct, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2022 09:54 PM
Thanks Akshay.It worked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2022 10:03 PM
Hello Suman,
Glad to know it's working for you.
Please mark reply as Correct, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2022 01:36 AM
Hello,
Glad to know my answer worked for you. Please mark reply as Correct so it will be helpful for others looking for similar query.