【问题标题】:WorkDay Human_Resources API IntegrationWorkDay Human_Resources API 集成
【发布时间】:2018-12-07 00:49:57
【问题描述】:

我已经使用 asp.net C# 成功集成了 Human_Resources 和 Financial_Management。因此,我将我遇到的所有问题和在网上找到的有用资源汇总在一起:

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 提交数据时遇到同样的错误

错误

There was an error in serializing one of the headers in message Get_ProjectsInput: ‘Unable to generate a temporary class (result=1).
error CS0030: Cannot convert type ‘ConsoleApplication1.WkDay.Rm.Asset_Book_Rule_Request_CriteriaType’ to ‘ConsoleApplication1.WkDay.Rm.Asset_Book_Rule_Request_ReferencesType’
error CS0030: Cannot convert type ‘ConsoleApplication1.WkDay.Rm.Asset_Shares_Request_CriteriaType’ to ‘ConsoleApplication1.WkDay.Rm.Asset_Shares_Request_ReferenceType’
error CS0029: Cannot implicitly convert type ‘ConsoleApplication1.WkDay.Rm.Asset_Book_Rule_Request_ReferencesType’ to ‘ConsoleApplication1.WkDay.Rm.Asset_Book_Rule_Request_CriteriaType’
error CS0029: Cannot implicitly convert type ‘ConsoleApplication1.WkDay.Rm.Asset_Shares_Request_ReferenceType’ to ‘ConsoleApplication1.WkDay.Rm.Asset_Shares_Request_CriteriaType’
‘. Please see InnerException for more details.

【问题讨论】:

  • 你到底想问什么?
  • 实际上不是一个问题。只是分享我为使工作日集成工作所做的工作。 StackOverflow 有类似的部分吗?我应该把这篇文章移到那里。
  • @AlfredRoa 请将解决方案放在下面的答案部分,与问题分开(然后您可以接受它作为解决方案,这标志着问题已解决)

标签: c# api integration workday-api


【解决方案1】:

注释掉

[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;
        }
    }

【讨论】:

  • 我为 Workday 构建了一个 C# WCF 客户端,我发现每个请求大约需要 90 秒,因为我得到了 1 条记录或 100 条记录。有没有其他人经历过这个缓慢的孩子?
【解决方案2】:

使用 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; }
        }

【讨论】:

    猜你喜欢
    • 2022-12-22
    • 2020-03-09
    • 2018-06-06
    • 2019-02-16
    • 2018-10-12
    • 2015-10-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多