public SiebelAnswer InvokeMethod(string BsName, string FunctionName, PropertySet ips) { SIEBELHTMLLib.ISiebelService mainBs = AppSiebel.GetService(m_mainBsName); PropertySet ops = new PropertySet(); SiebelAnswer answer = new SiebelAnswer(); //SIEBELHTMLLib.SiebelPropertySet tmpPs = ; //mainBs.InvokeMethod(BsName + m_ServiceFunctionDivider + FunctionName, ips.GetChild(0).SiebelPS, ops.SiebelPS); mainBs.InvokeMethod(BsName + m_ServiceFunctionDivider + FunctionName, ips.SiebelPS, ops.SiebelPS); if (ops.Property("Status") == "Error") { string errMsg = ""; if (ops.GetChild(0).GetChild(0).Property("ErrCode") == /*"22360"*/ "11338003" && ops.GetChild(0).GetChild(0).Property("ErrMsg").IndexOf(m_mainBsName) != -1) { errMsg = "BS '" + m_mainBsName + "' no present on Siebel.\nIt need for running this application. Please create it and\ndescribe in application parameters"; } //answer = new SiebelAnswer(ops, ); else { //answer = new SiebelAnswer(ops, "ErrCode = " + ops.GetChild(0).GetChild(0).Property("ErrCode") + "; ErrMsg = " + ops.GetChild(0).GetChild(0).Property("ErrMsg")); errMsg = RecoveryFromXml(ops.GetChild(0).GetChild(0).Property("ErrMsg")); } answer = new SiebelAnswer(ops, errMsg); } else { for (int i = 0; i < ops.ChildCount; i++) { if (ops.GetChild(i).PsType == "TestBsOps") { answer = new SiebelAnswer(ops, ops.GetChild(i).GetChild(0)); break; } } } return(answer); }
public string PsToXml(PropertySet ps) { string xml = InvokeMethod(m_mainBsName, m_FuncPs2XmlName, ps.GetChild(0)).FunctionResult.PsValue; return(xml); }