有谁知道我如何处理来自 Maximo Query Web 服务的 Maximo 响应?
我能够从 Maximo 获取数据集响应,但是当我尝试获取工作订单属性(例如WONUM
等SITEID
)时,所有属性都返回为null
.
以下是我正在使用的代码,不胜感激。
MXWO_WORKORDERType wo_add = new MXWO_WORKORDERType();
MXWO_WORKORDERType[] wo_results;
DateTime creationDateTime = new DateTime();
bool creationDateTimeSpecified = false;
string language = "NoDef";
string transLanguage = "NoDef";
string messageID = "NoDef";
string maximoVersion = "NoDef";
bool uniqueResult = false;
string maxItems = "10000";
string rsStart = "0";
string rsCount = "NoDef";
string rsTotal = "NoDef";
MXStringType mxstringStID = new MXStringType();
MXStringType mxstringstatus = new MXStringType();
MXStringType mxstringwonum = new MXStringType();
// create query from string
MXWOQueryType query = new MXWOQueryType();
query.WHERE = ("SITEID = 'ABC' AND STATUS='WAPPR'");
MXWOPortTypeClient c = new MXWOPortTypeClient("MXWOSOAP1Port");
// perform query
MXWO_WORKORDERType[] returnedWOs = c.QueryMXWO(query, ref creationDateTime, ref language, ref transLanguage, ref messageID, ref maximoVersion, uniqueResult, maxItems, ref rsStart, out rsCount, out rsTotal);
MXWO_WORKORDERType wo = null;
for (int i = 0; i < returnedWOs.Length; i++)
{
mxstringwonum.Value = returnedWOs[i].WONUM.Value;
wo.WONUM = mxstringwonum;
MessageBox.Show(mxstringwonum.Value);
}