Интеграция ServiceNow с C # и основным приложением dotnet - PullRequest
0 голосов
/ 03 ноября 2018

Защищено void Button1_Click (отправитель объекта, EventArgs e) {

//Incident Service

        IncidentService.ServiceNowSoapClient soapClient = new IncidentService.ServiceNowSoapClient();
        soapClient.ClientCredentials.UserName.UserName = "username"; // username have SOAP role in SNow.
        soapClient.ClientCredentials.UserName.Password = "Password1";
        IncidentService.getRecords _getRecords = new IncidentService.getRecords();
        IncidentService.getRecordsResponseGetRecordsResult[] getRecordsResponses = soapClient.getRecords(_getRecords);
        _getRecords.active = true;

        // Note: Please enable SOAP/REST services in your SNow dev instance table(s), Also,
        // Go to system web services --> properties -> enable the 3rd option from the bottom.(This property sets the elementFormDefault attribute of the embedded XML schema to the value of unqualified)
        //ServiceNowSoapClient client = new ServiceNowSoapClient();
        //client.ClientCredentials.UserName.UserName = "username"; // username have SOAP role in SNow.
        //client.ClientCredentials.UserName.Password = "Password1";

        //insert newRecord = new insert();
        //insertResponse insertResponse = new insertResponse(); 
        //newRecord.first_name = "Jackson";
        //newRecord.last_name = "Chris";
        //newRecord.phone_number = "911-911-9999";
        //newRecord.number = "CUS3048232";
        try
        {
            //insertResponse = client.insert(newRecord);
            //TextBox1.Text = insertResponse.sys_id;

            getRecordsResponses = soapClient.getRecords(_getRecords);
            for (int i = 0; i < getRecordsResponses.Length; i++)
            {
                TextBox2.Text = getRecordsResponses[i].short_description;
                TextBox3.Text = getRecordsResponses[i].category;
            }
        }
        catch (Exception ex)
        {
            TextBox1.Text = ex.Message;
        }
        //finally { client.Close(); }

}

Как вы используете данные ServiceNow, которые находятся в корпоративном сервисе (CMDB, ITIL, различные корпоративные базы данных, новые базы данных) dev, prod экземпляры создавать сквозные автоматизированные приложения с C #, dotnetcore.

наша цель - автоматизировать приложения сквозным использованием ServiceNow, dotnetcore, C #, Docker-контейнеров, Ansible, Automic.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...