0
我正在嘗試使用BMC Remedy 7.6.04創建Remedy事件的Web服務。其中一些參數是您從中選擇一個值發送回Web服務的數組,例如狀態。我收到以下錯誤,當我選擇StatusType,UrgencyType和ImpactType.Here是狀態類型的錯誤:如何將列表數組參數傳遞給C中的Web服務#
不能鍵入「Client.RemedyInc.StatusType」隱式轉換爲 「Client.RemedyInc.StatusType []」
狀態處於reference.cs列舉如下:
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.233")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:HPD_IncidentInterface_Create_WS")]
public enum StatusType {
/// <remarks/>
New,
/// <remarks/>
Assigned,
/// <remarks/>
[System.Xml.Serialization.XmlEnumAttribute("In Progress")]
InProgress,
/// <remarks/>
Pending,
/// <remarks/>
Resolved,
/// <remarks/>
Closed,
/// <remarks/>
Cancelled,
}
AND:
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="urn:HPD_IncidentInterface_Create_WS", Order=32)]
[System.Xml.Serialization.XmlElementAttribute("Status")]
public StatusType[] Status;
這裏是我的代碼示例:
protected void ToRemedy_Click(object sender, EventArgs e)
{
RemedyInc.AuthenticationInfo AuthInfo = new RemedyInc.AuthenticationInfo();
AuthInfo.userName = "User";
AuthInfo.password = "Password";
RemedyInc.HelpDesk_Submit_ServiceRequest RemTicket = new RemedyInc.HelpDesk_Submit_ServiceRequest();
RemTicket.AuthenticationInfo = AuthInfo;
RemTicket.Summary = "This is a web service Test";
RemTicket.Last_Name = "LName";
RemTicket.First_Name = "FName";
RemTicket.Service_Type = RemedyInc.Service_TypeType.UserServiceRequest;
RemTicket.Reported_Source = RemedyInc.Reported_SourceType.SelfService;
RemTicket.Status = RemedyInc.StatusType.New;
RemTicket.Urgency = RemedyInc.UrgencyType.Item4Low;
RemTicket.Impact = RemedyInc.ImpactType.Item4MinorLocalized;
RemTicket.Notes = "This is a web service test";
RemTicket.TemplateID = "AGGAAHHLITMRAAMBGOJWBIN45LBV62";
RemTicket.Action = "CREATE";
}
任何幫助將不勝感激。 Ken