Advertisement
Guest User

Untitled

a guest
Jun 9th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ATtoSN_Integration
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. SNIncident.ServiceNowSoapClient soapClient = new SNIncident.ServiceNowSoapClient();
  14. soapClient.ClientCredentials.UserName.UserName = "iVisionSOAP";
  15. soapClient.ClientCredentials.UserName.Password = "mYqI5t81ZIAKeHj";
  16. var SNInsertobj = new SNIncident.insert();
  17. SNInsertobj.active = true;
  18. SNInsertobj.short_description = ("Yeah this is a cool title");
  19. SNInsertobj.description = ("Yah this is an epic description");
  20. try
  21. {
  22. var response = soapClient.insert(SNInsertobj);
  23. if (response == null) { Console.WriteLine("No response recieved\n"); }
  24. else
  25. {
  26. Console.WriteLine("Incident Number: " + response.number);
  27. Console.WriteLine("Sys_id: " + response.sys_id);
  28. }
  29. Console.WriteLine("Press any key...");
  30. Console.ReadKey();
  31. ;
  32. }
  33. catch (Exception error)
  34. {
  35. Console.Write(error.Message);
  36. ;
  37. }
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement