Parse the XML content received from webservice SOAP response

shubham5957
Mega Contributor

I want to retrieve the content(like name, manager, project etc...) of the webservice response received through SOAP API and map to a custom table that will get updated on weekly basics.

18 REPLIES 18

yes you are right.I am already following option 2, but how to approach this.. i guess i have to do it through schedule job.. how will schedule job will access the soap response ..shall i have to use the preview soap script in it if yes what changes i have to make in it... then how i will map it to my custom table ? i am not getting it.. please help...


Hi Shubham,



If you have to do this daily then have schedule job.


you must have created soap message for this to consume the endpoint.


consume the soap message by using preview script usage functionality and send proper parameters


once you get the values in an array as mentioned earlier in my comment have gliderecord and insert or update record in your custom table.



Care to be taken:


1) SOAP message endpoint ensure is correct in each Dev/Test and Production because end point may be changing for the dev, test and production system



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

One more thing to I believe you have converted the XML format into CSV manually so technically how the snow will change the XML response into CSV, find the record   related to employee and then map it?


Have you tried SOAP outbound or scripted SOAP Outbound?



I think scheduling is not the problem here.



you can use XML Document2 and Node and Iterator to get through this.




https://developer.servicenow.com/app.do#!/api_doc?v=jakarta&id=c_XMLDocument2ScopedAPI