There is a great ServiceNow wiki article on how to create a C# .NET client that consumes a direct SOAP web service inside ServiceNow.
In order to provide graphical context the that wiki document, I have created a video that goes through the steps of setting up a .NET Visual Studio application to make Web Service Calls into ServiceNow. The example in the video follows the wiki document fairly closely.
Hi,
I tried with the above code snippet, but getting the below error:
Error in Request: System.NullReferenceException: Object reference not set to an instance of an object.
The line causing the error:
this.output.Text = “Request Number: ” + response.number + “\n”;
Hi John,
I unchecked the “elementFormDefault” and NULL data issue is resolved now. But still I could not fetch records. I am getting 0 records in my query. Also while inserting Incident, I got the error: “com.glide.processors.soap.SOAPProcessingException: Insufficient rights for creating new records”. Is it something to do with SOAP role? I do not have admin credentials. So how do I check if I have SOAP role? Also if I only want to fetch Incident details, is “SOAP_QUERY” role enough? I need to request my client accordingly.
regards,
Manjoy
Hi John,
Now I am able to getch details of incident in my group, but could not get Assigned Date, when the incident was last assigned to my group. I can see update date, but its not sufficient. Is there any way to get it?? Plz help.
@Manjoy, the role information should be on the User record in ServiceNow for the user that you are using to authenticate the SOAP Request.
@Manjoy:
Did you get the solution for both your problems?
@John and Manjoy
Even I am facing the same issues.
1. Insufficient rights to create new records
2. getRecords returning no records even though the elementFormDefault is unchecked.
Any help is really appreciable.
Thanks in advance
I’ve written a c# app that’s supposed to get all active incident tickets. Have you ever had a problem were you asked for active tickets and it still returned all of them?
ServiceNow_WebRef.getRecords getrecords = new ServiceNow_WebRef.getRecords();
ServiceNow_WebRef.getResponse getresponse = new ServiceNow_WebRef.getResponse();
string ResponseCaseID = “”;
try
{
getrecords.u_remote_ticket_number = RemoteTicketID;
getrecords.active = true; //this will return all tickets except closed ones
content of the page is not loading, can you check once