I have a code that works great when I add web reference, and on my code behind all the properties and signatures are all exposed. I can do inserts easily as you can see below
Dim soap As New ServiceNowRef.ServiceNow_incident
Dim cred As New System.Net.NetworkCredential("xxx", "xxxxx")
'Dim soapclient As New We
Dim msg As String = String.Empty
Dim insert As New ServiceNowRef.insert
Dim insertResponse As New ServiceNowRef.insertResponse
soap.Credentials = cred
insert.u_ticketnumber1 = Request.Form("ticketnumber1")
insert.u_ticketnumber2 = Request.Form("ticketnumber2")
insert.u_ticketstatus = Request.Form("TicketStatus")
insert.u_ticketstatusnotes = Request.Form("TicketStatusNotes")
Try
updateResponse = soap.insert(insert)
msg = "Incident inserted"
Catch ex As Exception
msg = "Incident Not inserted:" & ex.ToString
End TryThe code requirement has changed and instead of doing through webreference, I need to perform same function like INSERTing a record to an API, the URL & other references should be defined on the same page.
How do I achieve that? Is it possible without adding too much complexity. Can you show me some samples?
Thank You