Login to Cherwell
Before we begin, a few points to note about this example:
Usernames and Passwords provided are for a demo/starter database, you will need to provide credentials for a user within your environment.
The web service URL provided is typical for a local install of Cherwell.
The result of this method will return “True” if successful.
# Define URL, and create proxy for web service
$URI = "http://localhost/CherwellService/?WSDL"
$cherwellService = New-WebServiceProxy -Uri $URI
# Create container for storing session cookie
$cherwellService.CookieContainer = New-Object system.net.CookieContainer
# Run ‘Login’ method with provided credentials
Back to Top
Create a Record
To find out more about the XML structure used in the example below, read SDK Architecture.
$incidentID = $cherwellService.CreateBusinessObject("Incident","EventHenri BryceDesktop ManagementComputerRequest New Computer3From SOAP")
Find a Record
Query By Stored Query
$queryXml = $cherwellService.QueryByStoredQuery("Incident", "All Incidents")
Query By Field Value
$queryXml = $cherwellService.QueryByFieldValue("Incident", "Customer Display Name", "Henri Bryce")