Интеграция API WorkDay Human_Resources

Я успешно интегрировал Human_Resources и Financial_Management с помощью asp.net C#. Итак, я собрал все проблемы, с которыми столкнулся, и полезные ресурсы, которые я нашел в Интернете:

Документация WorkDay доступна по адресу: https://community.workday.com/sites/default/files/file-hosting/productionapi/index.html

Чтобы начать, прочитайте здесь http://hr.dovetailsoftware.com/gcox/2014/06/13/getting-started-workday-web-services-using-c/ убедитесь, что вы следовали некоторым советам по очистке этой статьи.

Если вы получаете ту же ошибку при отправке данных в WD

ошибка

Произошла ошибка при сериализации одного из заголовков в сообщении Get_ProjectsInput: "Невозможно сгенерировать временный класс (результат =1). Ошибка CS0030: Не удается преобразовать тип "ConsoleApplication1.WkDay.Rm.Asset_Book_Rule_Request_CriteriaType" в "" ConsoleApplication1.WkDay.Rm.Asset_Book_Rule_Request_ReferencesType ошибка CS0030: не удается преобразовать тип "ConsoleApplication1.WkDay.Rm.Asset_Shares_Request_CriteriaType" до "ConsoleApplication1.WkDay.Rm.Asset_Shares_Request_ReferenceType" ошибка CS0029: не удается неявно преобразовать тип 'ConsoleApplication1.WkDay.Rm.Asset_Book_Rule_Request_ReferencesType' в 'ConsoleApplication1.WkDay.Rm.Asset_Book_Rule_Request_CriteriaType' ошибка CS00291.est_Rey_Relay_WD Asset_Shares_Request_CriteriaType ''. Пожалуйста, смотрите InnerException для более подробной информации.

РЕШЕНИЕ: закомментируйте

[System.Xml.Serialization.XmlElementAttribute("Request_References", typeof(), Order=0)]

/// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("Request_Criteria", typeof(Asset_Book_Rule_Request_CriteriaType), Order=Asset_Book_Rule_Request_ReferencesType0)]
    //anr [System.Xml.Serialization.XmlElementAttribute("Request_References", typeof(), Order=0)]
    [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemElementName")]
    public Asset_Book_Rule_Request_CriteriaType Item
    {
        get
        {
            return this.itemField;
        }
        set
        {
            this.itemField = value;
        }
    }

1 ответ

/// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("Request_Criteria", typeof(Asset_Book_Rule_Request_CriteriaType), Order=Asset_Book_Rule_Request_ReferencesType0)]
    //anr [System.Xml.Serialization.XmlElementAttribute("Request_References", typeof(), Order=0)]
    [System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemElementName")]
    public Asset_Book_Rule_Request_CriteriaType Item
    {
        get
        {
            return this.itemField;
        }
        set
        {
            this.itemField = value;
        }
    }

Работая с Workday WS v32.1, это все еще проблема, но решение применимо.

[System.Xml.Serialization.XmlElementAttribute("Request_Criteria", typeof(Asset_Book_Rule_Request_CriteriaType), Order = 0)]
//[System.Xml.Serialization.XmlElementAttribute("Request_References", typeof(Asset_Book_Rule_Request_ReferencesType), Order = 0)]
[System.Xml.Serialization.XmlChoiceIdentifierAttribute("ItemElementName")]
        public Asset_Book_Rule_Request_CriteriaType Item
        {
            get { return this.itemField; }
            set { this.itemField = value; }
        }
Другие вопросы по тегам