我已经使用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提交数据时遇到相同的错误
错误
序列化消息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” 错误CS0029:无法将类型“ ConsoleApplication1.WkDay.Rm.Asset_Shares_Request_ReferenceType”隐式转换为“ ConsoleApplication1.WkDay.Rm.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;
}
}
答案 0 :(得分: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 :(得分:0)
使用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; }
}