我必须使用回调(异步)、结果..等调用 api(SOAP)。我必须使用的方法:
public IAsyncResult BeginInsertIncident(
string userName, string password, string MsgId, string ThirdPartyRef,
string Type, string EmployeeId, string ShortDescription, string Details,
string Category, string Service, string OwnerGrp, string OwnerRep,
string SecondLevelGrp, string SecondLevelRep, string ThirdLevelGrp,
string ThirdLevelRep, string Impact, string Urgency, string Priority,
string Source, string Status, string State, string Solution,
string ResolvedDate, string Cause, string Approved, AsyncCallback callback,
object asyncState);
EndInsertIncident(IAsyncResult asyncResult, out string msg);
EndInsertIncident 关闭票证系统中的请求,如果票证正确完成,则给出结果。
现状:
server3.ILTISAPI api = new servert3.ILTISAPI();
api.BeginInsertIncident(username, "", msg_id, "", "", windows_user,
"BISS - Software Deployment", "", "", "NOT DETERMINED", "", "", "", "", "",
"", "5 - BAU", "3 - BAU", "", "Interface", "", "", "", "", "", "", null,
null);
那么,现在,我如何实现回调函数?api“InsertIncidentCompleted”的状态已经为空,因为我认为我不调用 EndInsertIncident。
我是 C# 新手,需要一些帮助。