Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ATtoSN_Integration
- {
- class Program
- {
- static void Main(string[] args)
- {
- SNIncident.ServiceNowSoapClient soapClient = new SNIncident.ServiceNowSoapClient();
- soapClient.ClientCredentials.UserName.UserName = "iVisionSOAP";
- soapClient.ClientCredentials.UserName.Password = "mYqI5t81ZIAKeHj";
- var SNInsertobj = new SNIncident.insert();
- SNInsertobj.active = true;
- SNInsertobj.short_description = ("Yeah this is a cool title");
- SNInsertobj.description = ("Yah this is an epic description");
- try
- {
- var response = soapClient.insert(SNInsertobj);
- if (response == null) { Console.WriteLine("No response recieved\n"); }
- else
- {
- Console.WriteLine("Incident Number: " + response.number);
- Console.WriteLine("Sys_id: " + response.sys_id);
- }
- Console.WriteLine("Press any key...");
- Console.ReadKey();
- ;
- }
- catch (Exception error)
- {
- Console.Write(error.Message);
- ;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement