0% found this document useful (0 votes)
23 views2 pages

Bibingokuldas Servicenow Soap Cheat Sheet - BW

This cheat sheet provides an overview of ServiceNow SOAP API, detailing its structure, message types, and authentication methods. It includes specific functions for sending and receiving SOAP messages, as well as direct web service functionalities for querying and modifying records. Key concepts such as WSDL, SOAP envelope, and HTTP methods are also explained to aid users in effectively utilizing the SOAP API.

Uploaded by

ceo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views2 pages

Bibingokuldas Servicenow Soap Cheat Sheet - BW

This cheat sheet provides an overview of ServiceNow SOAP API, detailing its structure, message types, and authentication methods. It includes specific functions for sending and receiving SOAP messages, as well as direct web service functionalities for querying and modifying records. Key concepts such as WSDL, SOAP envelope, and HTTP methods are also explained to aid users in effectively utilizing the SOAP API.

Uploaded by

ceo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ServiceNow SOAP - Cheat Sheet Cheat Sheet

by Bibin Gokuldas (bibingokuldas) via cheatography.com/69673/cs/17691/

SOAP Vs Rest Basics SOAP Message API (cont)

setEcc​Cor​rel​ato​r(s​tri​‐ Associate outbound requests and the re

ngc​orr​elator) ECC queue. Applicable to SOAP Messa

setEcc​Par​ame​ter​(na​‐ Override a value from the database by w

me,​value) payload

setEnd​poi​nt(​end​point) Set the endpoint for the SOAP message

setHtt​pTi​meo​ut(​mil​ise​‐ Set the amount of time the SOAP messa

conds) the web service provider before the requ

setLog​Lev​el(​level) Sets the log level for this message and t


SOAP Structure The Values of level can be basic, elevat

SOAP It is the enclosing element of an XML message identi​fying it as a SOAP message.


setMID​Ser​ver​(mi​dse​‐ Configure the SOAP message to be sen
Envelope
rve​rname)
SOAP A collection of one or more header blocks targeted at each SOAP receiver.
setMut​ual​Aut​h(p​rof​ile​‐ Set the mutual authen​tic​ation protocol p
Header
name)
SOAP Contains the body of the message intended for the SOAP receiver. The interp​ret​ation and
setReq​ues​tBo​dy(​req​‐ Set the body content to send to the web
Body processing of SOAP body is defined by header blocks.
ues​tbody)
setReq​ues​tHe​ade​r(h​‐ Set an HTTP header in the SOAP mess
Authen​tic​ation Using SOAP
ead​ern​ame​,he​ade​‐
Basic Basic Authen​tic​ation can be enforced by setting a username and password for a webservice
rvalue)
Authen​‐ request. When the property is enabled 'glide.ba​sic​aut​h.r​equ​ired' then auth header is mandatory
setSOA​PAc​tio​n(s​oap​‐ Define the SOAP action this SOAP mes
tic​ation
action)
setStr​ing​Par​ame​ter​‐ Set a variable with the specified name fr
SOAP Message API
(na​me,​value) record to the specified value.
execute() Send the SOAP message to the endpoint.
setStr​ing​Par​ame​ter​‐ Set a variable with the specified name fr
execut​eAs​ync() Send the SOAP message to the ECC queue.
NoE​sca​pe(​nam​e,v​‐ record to the specified value, doesn't es

getEnd​point() Get End point of specified SOAP message


alue)
getReq​ues​tBody() Get the content of the SOAP message body.

getReq​ues​tHe​ade​r(h​ead​‐ Get the value for an HTTP header specified by the SOAP client.

ername)

getReq​ues​tHe​aders() Get HTTP headers that were set by the SOAP client and the associated

values.

setBas​icA​uth​(us​ern​ame​,pa​‐ Set basic authen​tic​ation headers for the SOAP message.

ssword)

By Bibin Gokuldas (bibingokuldas) Not published yet. Sponsored by CrosswordChe


cheatography.com/bibingokuldas/ Last updated 30th October, 2018. Learn to solve cryptic crosswor
bibingokuldas.com/ Page 1 of 2. http://crosswordcheats.com
ServiceNow SOAP - Cheat Sheet Cheat Sheet
by Bibin Gokuldas (bibingokuldas) via cheatography.com/69673/cs/17691/

SOAP Message API (cont) Direct Webser​vices (cont)

setWSS​ecu​rit​y(k​eys​tre​ID,​key​str​eal​ias​,ke​yst​rep​‐ Sets web service security values for the SOAP delete​‐ Deletes a record from the targeted table by supp

swd​,ce​rti​ficate) message. Record sys_id.

delete​Mul​‐ Delete multiple records from the targeted table b


Are my Questions answered? tiple example values.

The standard SOAP API is a set of globally defined functions that

in Servic​eNow, these functions cant be changed.


SOAP Concepts & Termin​ology
Provider : Publishes web service for clients to invoke (consume).
Direct Webservice API is defined by the format https:​//<​ins​tance n
Consumer : Invokes / consumes published web service.
om​/<table name>.do
Standards : Standards are described below

WSDL : Web Service Descri​ption Language , XML document describing functions, arguments, data schema, and
SOAP Response APIs
endpoint (where / how to invoke the service, URL)
getAll​Hea​‐ Return all headers contained in the respons
SOAP : Simple Object Access Protocol, XML document usually HTTP posted to web service endpoint described in
ders() headers.
WSDL SOAP:E​nvelope / SOAP:H​eader / SOAP:Body
getBody() Get the content of the SOAP response body
HTTP : Hyper-Text Transfer Protocol, POST vs GET - Web Service is POSTed

getCoo​kies() Returns all cookies included in the response

Direct Webser​vices getErr​orC​ode() Get the numeric error code if there was an e

Query the targeted table by example values and return a comma delimited sys_id list. Data cti​on.This is not Linked with the HTTP error
getKeys
Retrieval Get the error message if there was an error
getErr​orM​ess​‐
API
age()
getRecords Query the targeted table by example values and return all matching records and their Data Get the value for a specified HTTP header.I
getHea​der​‐
fields. Retrieval (name) then it will return the last of duplicate.
API
getSta​tus​‐ Get the numeric HTTP status code returned

get Query a single record from the targeted table by sys_id and return the record and its Data Code()
fields. Retrieval Indicate if there was an error during the SO
haveEr​ror()
API
waitFo​rRe​spo​‐ Set the amount of time in seconds, the insta

aggregate Query using and aggregate functions SUM, COUNT MIN, MAX and AVG. To enable Data from the web service provider.
nse​(se​conds)
the aggregate functions, activate the Aggregate Web Service Plugin. Retrieval
The API which uses these function is SOAPRe​spo​nseV2
API
var r = new sn_ws.S​OA​PMe​ssa​geV​2('​SOA​PMe​ssage, 'funct​ion');
insert Creates a new record for the table targeted in the URL. Data
var resp = r.exec​ute();
Modifi​‐
var hdrs = resp.g​etA​llH​ead​ers();
cation API
for(var i in hdrs){

insert​Mul​‐ Creates multiple new records for the table targeted in the URL. To enable multiple Data gs.log​(hd​rs[​i].name + ': ' + hdrs[i​].v​alue);

tiple inserts, activate the Web Service Insert Multiple Plugin. Modifi​‐ }
cation API

update Updates a existing record in the targeted table in the URL, identified by the mandatory Data

sys_id field. Modifi​‐

cation API

By Bibin Gokuldas (bibingokuldas) Not published yet. Sponsored by CrosswordChe


cheatography.com/bibingokuldas/ Last updated 30th October, 2018. Learn to solve cryptic crosswor
bibingokuldas.com/ Page 2 of 2. http://crosswordcheats.com

You might also like