How to call third party web services from service now ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2014 11:44 PM
I am new to this and I have the follwoing integration to complete - Can any one please guide me how to proceed ?
On Incident create/edit/resolve - I need to trigger a call to 3rd Party WCF and update the incident details (Number, Short Desc, Opened, Assigned to, Priority) to the vendors application.
Need help :
1. How to get the events on Incident - Submit/ load/ update etc - Is that can be done from "Client Scripts " section. May I do something like
function onSubmit() {
// My wcf service call goes here: Not sure how to call.
}
2. How to call SOAP web services from Service Now. Say I need to call this method - PutProject
This also requires Basic Authentication. (UserName , password ) . If there is a way to pass cookie information , that 'll be good.
3. How to set some custom field values of Incident from a third party application - Say I want to add a Id to incident (which is retried from third party product.)Rob Woodbyrne Eric SchrederFred LuddyJeff HollingerBill Collins
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2014 01:57 AM
here's a starter wiki page:
Web Service Consumer Support - ServiceNow Wiki
Web Services - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2014 02:05 AM
I have added a "OutBound Soap Message". I can see the output in test page. But I am not able to call the same from client script. here is my code snippet in client script
var s = new SOAPmessage('Replicon_ProjectService1', 'PutProject');
s.setParameter('percentCompleted',0);
s.setParameter('isTimeEntryAllowed',true);
s.setParameter('targetname',g_form.getValue('short_description').toString());
s.setParameter('isClosed',false);
s.setParameter('code',g_form.getValue('number').toString());
var response = s.post();
// parse response and do something
I have this "onSubmit" for Incident. when I submit anew Incident I get the error that
onSubmit script error: ReferenceError: SOAPmessage is not defined:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2014 02:10 AM
Try in a Business rule on update, I don't think SOAPmessage can be called like that in the client. I would get it working in a BR first.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2014 02:12 AM
Or rather you would need to call it similar to this in the client... but firstly I would get it working server side.
- var ajax = new GlideAjax('MySOAPCallAjax');
- ajax.addParam('sysparm_percentCompleted','xxxxxxxxxxxxxxx');//
- ajax.addParam('sysparm_isTimeEntryAllowed', xxxxxxxxxxx);
- showLoadingDialog();//Bring up a loading icon
- ajax.getXMLWait();
- var ans = ajax.getAnswer();