public CAdxResultXml save(CAdxCallContext callContext, string publicName, string objectXml) { object[] results = this.Invoke("save", new object[] { callContext, publicName, objectXml}); return ((CAdxResultXml)(results[0])); }
private CAdxWebServiceXmlCC.CAdxCallContext GetCallContext() { CAdxCallContext callContext = new CAdxWebServiceXmlCC.CAdxCallContext(); callContext.codeLang = cmbCodeLang.Text.ToString().Trim(); callContext.poolAlias = txtPoolAlias.Text.ToString().Trim(); callContext.requestConfig = GetRequestConfig(); if (String.IsNullOrEmpty(lblPoolId.Text.Trim()) == true) { callContext.poolId = lblPoolId.Text.Trim(); } return callContext; }
private XmlNode GetLeftListItems(CAdxCallContext callContext) { XmlNode grpNode = null; try { string wsName = cmbWebService.Text.ToUpper().Trim(); CAdxWebServiceXmlCC.CAdxResultXml result = _x3Ws.getDescription(callContext, wsName); if (result.resultXml != null) { XmlDocument xmlD = new XmlDocument(); xmlD.LoadXml(result.resultXml); XmlNodeList adxKey = xmlD.GetElementsByTagName("ADXKEY"); grpNode = adxKey.Item(0).FirstChild; } else { if (result.messages != null && result.messages.Length > 0) { MessageBox.Show(result.messages[0].message); } } } catch (Exception ex) { ErrorHandler(ex.Message); } return grpNode; }
/// <remarks/> public void insertLinesAsync(CAdxCallContext callContext, string publicName, CAdxParamKeyValue[] objectKeys, string blocKey, string lineKey, string lineXml) { this.insertLinesAsync(callContext, publicName, objectKeys, blocKey, lineKey, lineXml, null); }
/// <remarks/> public void deleteLinesAsync(CAdxCallContext callContext, string publicName, CAdxParamKeyValue[] objectKeys, string blocKey, string[] lineKeys) { this.deleteLinesAsync(callContext, publicName, objectKeys, blocKey, lineKeys, null); }
/// <remarks/> public void actionObjectKeysAsync(CAdxCallContext callContext, string publicName, string actionCode, CAdxParamKeyValue[] objectKeys, object userState) { if ((this.actionObjectKeysOperationCompleted == null)) { this.actionObjectKeysOperationCompleted = new System.Threading.SendOrPostCallback(this.OnactionObjectKeysOperationCompleted); } this.InvokeAsync("actionObjectKeys", new object[] { callContext, publicName, actionCode, objectKeys}, this.actionObjectKeysOperationCompleted, userState); }
/// <remarks/> public void getDataXmlSchemaAsync(CAdxCallContext callContext, string publicName) { this.getDataXmlSchemaAsync(callContext, publicName, null); }
/// <remarks/> public void queryAsync(CAdxCallContext callContext, string publicName, CAdxParamKeyValue[] objectKeys, int listSize) { this.queryAsync(callContext, publicName, objectKeys, listSize, null); }
/// <remarks/> public void queryAsync(CAdxCallContext callContext, string publicName, CAdxParamKeyValue[] objectKeys, int listSize, object userState) { if ((this.queryOperationCompleted == null)) { this.queryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnqueryOperationCompleted); } this.InvokeAsync("query", new object[] { callContext, publicName, objectKeys, listSize}, this.queryOperationCompleted, userState); }
/// <remarks/> public void readAsync(CAdxCallContext callContext, string publicName, CAdxParamKeyValue[] objectKeys) { this.readAsync(callContext, publicName, objectKeys, null); }
public CAdxResultXml query(CAdxCallContext callContext, string publicName, CAdxParamKeyValue[] objectKeys, int listSize) { object[] results = this.Invoke("query", new object[] { callContext, publicName, objectKeys, listSize}); return ((CAdxResultXml)(results[0])); }
public CAdxResultXml read(CAdxCallContext callContext, string publicName, CAdxParamKeyValue[] objectKeys) { object[] results = this.Invoke("read", new object[] { callContext, publicName, objectKeys}); return ((CAdxResultXml)(results[0])); }
/// <remarks/> public void saveAsync(CAdxCallContext callContext, string publicName, string objectXml, object userState) { if ((this.saveOperationCompleted == null)) { this.saveOperationCompleted = new System.Threading.SendOrPostCallback(this.OnsaveOperationCompleted); } this.InvokeAsync("save", new object[] { callContext, publicName, objectXml}, this.saveOperationCompleted, userState); }
/// <remarks/> public void saveAsync(CAdxCallContext callContext, string publicName, string objectXml) { this.saveAsync(callContext, publicName, objectXml, null); }
public CAdxResultXml actionObjectKeys(CAdxCallContext callContext, string publicName, string actionCode, CAdxParamKeyValue[] objectKeys) { object[] results = this.Invoke("actionObjectKeys", new object[] { callContext, publicName, actionCode, objectKeys}); return ((CAdxResultXml)(results[0])); }
public CAdxResultXml getDescription(CAdxCallContext callContext, string publicName) { object[] results = this.Invoke("getDescription", new object[] { callContext, publicName}); return ((CAdxResultXml)(results[0])); }
/// <remarks/> public void actionObjectKeysAsync(CAdxCallContext callContext, string publicName, string actionCode, CAdxParamKeyValue[] objectKeys) { this.actionObjectKeysAsync(callContext, publicName, actionCode, objectKeys, null); }
/// <remarks/> public void getDescriptionAsync(CAdxCallContext callContext, string publicName) { this.getDescriptionAsync(callContext, publicName, null); }
public CAdxResultXml getDataXmlSchema(CAdxCallContext callContext, string publicName) { object[] results = this.Invoke("getDataXmlSchema", new object[] { callContext, publicName}); return ((CAdxResultXml)(results[0])); }
public CAdxResultXml modify(CAdxCallContext callContext, string publicName, CAdxParamKeyValue[] objectKeys, string objectXml) { object[] results = this.Invoke("modify", new object[] { callContext, publicName, objectKeys, objectXml}); return ((CAdxResultXml)(results[0])); }
/// <remarks/> public void getDataXmlSchemaAsync(CAdxCallContext callContext, string publicName, object userState) { if ((this.getDataXmlSchemaOperationCompleted == null)) { this.getDataXmlSchemaOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetDataXmlSchemaOperationCompleted); } this.InvokeAsync("getDataXmlSchema", new object[] { callContext, publicName}, this.getDataXmlSchemaOperationCompleted, userState); }
/// <remarks/> public void modifyAsync(CAdxCallContext callContext, string publicName, CAdxParamKeyValue[] objectKeys, string objectXml) { this.modifyAsync(callContext, publicName, objectKeys, objectXml, null); }
public CAdxResultXml deleteLines(CAdxCallContext callContext, string publicName, CAdxParamKeyValue[] objectKeys, string blocKey, string[] lineKeys) { object[] results = this.Invoke("deleteLines", new object[] { callContext, publicName, objectKeys, blocKey, lineKeys}); return ((CAdxResultXml)(results[0])); }
/// <remarks/> public void modifyAsync(CAdxCallContext callContext, string publicName, CAdxParamKeyValue[] objectKeys, string objectXml, object userState) { if ((this.modifyOperationCompleted == null)) { this.modifyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnmodifyOperationCompleted); } this.InvokeAsync("modify", new object[] { callContext, publicName, objectKeys, objectXml}, this.modifyOperationCompleted, userState); }
/// <remarks/> public void deleteLinesAsync(CAdxCallContext callContext, string publicName, CAdxParamKeyValue[] objectKeys, string blocKey, string[] lineKeys, object userState) { if ((this.deleteLinesOperationCompleted == null)) { this.deleteLinesOperationCompleted = new System.Threading.SendOrPostCallback(this.OndeleteLinesOperationCompleted); } this.InvokeAsync("deleteLines", new object[] { callContext, publicName, objectKeys, blocKey, lineKeys}, this.deleteLinesOperationCompleted, userState); }
public CAdxResultXml actionObject(CAdxCallContext callContext, string publicName, string actionCode, string objectXml) { object[] results = this.Invoke("actionObject", new object[] { callContext, publicName, actionCode, objectXml}); return ((CAdxResultXml)(results[0])); }
private CAdxParamKeyValue[] GetCriteria(CAdxCallContext cAdxCallContext) { // Split Criteria string String[] keyValues = txtCriteria.Text.Split('\n'); // Get left list keys XmlNode leftListNode = GetLeftListItems(cAdxCallContext); // SSHA Only supports upto 50 parameters CAdxParamKeyValue[] objectKeys = new CAdxParamKeyValue[keyValues.Length]; if (leftListNode != null) { int keyIndex = 0; for (int i = 0; i < keyValues.Length; i++) { if (String.IsNullOrEmpty(keyValues[i].Trim()) == false) { CAdxParamKeyValue paramKeyValue = CreateParamKeyValue(leftListNode, keyValues, i); objectKeys[keyIndex] = paramKeyValue; keyIndex++; } } } return objectKeys; }
/// <remarks/> public void actionObjectAsync(CAdxCallContext callContext, string publicName, string actionCode, string objectXml) { this.actionObjectAsync(callContext, publicName, actionCode, objectXml, null); }
private void CallWebService() { try { //general variables string[] lineKeys; //Create WS objets CAdxWebServiceXmlCC.CAdxCallContext cAdxCallContext = new CAdxCallContext(); CAdxWebServiceXmlCC.CAdxResultXml cAdxResultXml = new CAdxResultXml(); CAdxParamKeyValue[] objectKeys; // Grab settings string objectXml = txtParam.Text.ToString().Trim(); string blockKey = txtBlockKey.Text.Trim(); int listSize = String.IsNullOrEmpty(txtListSize.Text) ? 0 : int.Parse(txtListSize.Text); string actionCode = txtActionCode.Text.Trim(); //Records application start time DateTime dt = DateTime.Now; // Clear results, messages, traces, etc and set url ClearOutputs(true); // Set URL, get call context and authenticate _x3Ws.Url = txtWebsite.Text.Trim() + "/soap-generic/syracuse/collaboration/syracuse/CAdxWebServiceXmlCC"; cAdxCallContext = GetCallContext(); //Trust all certificates System.Net.ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) => true); // Trust our stagging server // System.Net.ServicePointManager.ServerCertificateValidationCallback = ((sender, cert, chain, errors) => cert.Subject.Contains("sagex3.com")); //System.Net.ServicePointManager.ServerCertificateValidationCallback = ((sender, cert, chain, errors) => cert.Subject.Contains("sageerpx3online.com")); // If you are using a third party certificate, add code here to validate it. // V9 requires prior authorization, establish the authorization method if (rdbBasic.Checked == true) { //use basic authentication _x3Ws.BasicAuth = true; _x3Ws.Credentials = new System.Net.NetworkCredential(txtCodeUser.Text.ToString().Trim(), txtPassword.Text.ToString().Trim()); }else { //use Sage-ID OAuth authentication _x3Ws.BasicAuth = false; _x3Ws.AccessToken = GetAccessToken(txtRetrievalUrl.Text.Trim()); } _x3Ws.PreAuthenticate = true; // Call appropiate WS method string wsName = cmbWebService.Text.ToUpper().Trim(); string methodName = lstMethods.Text.ToUpper().Trim(); switch (methodName) { case "GETDESCRIPTION": cAdxResultXml = _x3Ws.getDescription(cAdxCallContext, wsName); break; case "GETDATAXMLSCHEMA": cAdxResultXml = _x3Ws.getDataXmlSchema(cAdxCallContext, wsName); break; case "RUN": cAdxResultXml = _x3Ws.run(cAdxCallContext,wsName, objectXml); break; case "QUERY": objectKeys = GetCriteria(cAdxCallContext); cAdxResultXml = _x3Ws.query(cAdxCallContext, wsName, objectKeys, listSize); break; case "READ": objectKeys = GetCriteria(cAdxCallContext); cAdxResultXml = _x3Ws.read(cAdxCallContext,wsName, objectKeys); break; case "MODIFY": objectKeys = GetCriteria(cAdxCallContext); cAdxResultXml = _x3Ws.modify(cAdxCallContext,wsName, objectKeys, objectXml); break; case "SAVE": cAdxResultXml = _x3Ws.save(cAdxCallContext, wsName, objectXml); break; case "DELETE": objectKeys = GetCriteria(cAdxCallContext); cAdxResultXml = _x3Ws.delete(cAdxCallContext,wsName, objectKeys); break; case "DELETELINES": objectKeys = GetCriteria(cAdxCallContext); lineKeys = GetDeleteLineKeys(); cAdxResultXml = _x3Ws.deleteLines(cAdxCallContext, wsName, objectKeys, blockKey, lineKeys); break; case "ACTIONOBJECT": //********************************************************************************************** cAdxResultXml = _x3Ws.actionObject(cAdxCallContext, wsName, actionCode, objectXml); break; default: MessageBox.Show("Select a supported methods"); break; } ShowResults(cAdxResultXml, (DateTime.Now - dt).TotalMilliseconds.ToString()); } catch (Exception ex) { ErrorHandler(ex.Message); } }
/// <remarks/> public void runAsync(CAdxCallContext callContext, string publicName, string inputXml) { this.runAsync(callContext, publicName, inputXml, null); }