public void Create_instanceServ(ref string ticket, ref ONOid agentOid, XmlReader xmlReader, XmlWriter xmlWriter, double dtdVersion, string clientName) { // Process the service arguments ONServiceInfo lSInfo = new ONServiceInfo("Clas_1348178542592658Ser_1_Alias", PasajeroClassText.Create_instanceServiceAlias, "Clas_1348178542592658_Alias", PasajeroClassText.ClassAlias); lSInfo.AddOIDArgument("p_agrPasajeroAeronave", false, "PasajeroAeronave", "Clas_1348178542592658Ser_1Arg_4_Alias", PasajeroClassText.Create_instance_P_agrPasajeroAeronaveArgumentAlias); lSInfo.AddDataValuedArgument("p_atrid_Pasajero", false, DataTypeEnumerator.Autonumeric, 0, "Clas_1348178542592658Ser_1Arg_1_Alias", PasajeroClassText.Create_instance_P_atrid_PasajeroArgumentAlias); lSInfo.AddDataValuedArgument("p_atrNombre", false, DataTypeEnumerator.Text, 0, "Clas_1348178542592658Ser_1Arg_2_Alias", PasajeroClassText.Create_instance_P_atrNombreArgumentAlias); try { lSInfo.XML2ON(xmlReader, dtdVersion, true); } catch (Exception e) { throw new ONServiceArgumentsException(e, "Clas_1348178542592658_Alias", PasajeroClassText.ClassAlias, "Clas_1348178542592658Ser_1_Alias", PasajeroClassText.Create_instanceServiceAlias); } PasajeroAeronaveOid lP_agrPasajeroAeronaveArg = (PasajeroAeronaveOid)((ONArgumentInfo)lSInfo.mArgumentList["p_agrPasajeroAeronave"]).Value; ONInt lP_atrid_PasajeroArg = (ONInt)((ONArgumentInfo)lSInfo.mArgumentList["p_atrid_Pasajero"]).Value; ONText lP_atrNombreArg = (ONText)((ONArgumentInfo)lSInfo.mArgumentList["p_atrNombre"]).Value; // Create Context ONServiceContext lOnContext = new ONServiceContext(); lOnContext.OidAgent = agentOid; // Execute Service PasajeroInstance lInstance = null; try { ONFilterList lFilterList = new ONFilterList(); PasajeroAeronaveInstance lp_agrPasajeroAeronaveInstance = new PasajeroAeronaveInstance(lOnContext); if (lP_agrPasajeroAeronaveArg != null) { lFilterList = new ONFilterList(); lFilterList.Add("HorizontalVisibility", new PasajeroAeronaveHorizontalVisibility()); lp_agrPasajeroAeronaveInstance = lP_agrPasajeroAeronaveArg.GetInstance(lOnContext, lFilterList); if (lp_agrPasajeroAeronaveInstance == null) { throw new ONInstanceNotExistException(null, "Clas_1348178542592177_Alias", PasajeroAeronaveClassText.ClassAlias); } } using (PasajeroServer lServer = new PasajeroServer(lOnContext, null)) { lServer.Create_instanceServ(lP_agrPasajeroAeronaveArg, lP_atrid_PasajeroArg, lP_atrNombreArg); lInstance = lServer.Instance; } ticket = lOnContext.GetTicket(dtdVersion, clientName); } catch (SecurityException) { throw new ONAccessAgentValidationException(null); } catch { throw; } // Write Oid if (dtdVersion >= 3.1) { if (lInstance != null) { ON2XML(xmlWriter, lInstance.Oid, dtdVersion, ONXml.XMLTAG_OIDFIELD); } } // Write Outbound Arguments xmlWriter.WriteStartElement("Arguments"); // Write Outbound Arguments xmlWriter.WriteEndElement(); // Arguments }
public void Edit_instanceServ(ref string ticket, ref ONOid agentOid, XmlReader xmlReader, XmlWriter xmlWriter, double dtdVersion, string clientName) { // Process the service arguments ONServiceInfo lSInfo = new ONServiceInfo("Clas_1348178542592658Ser_3_Alias", PasajeroClassText.Edit_instanceServiceAlias, "Clas_1348178542592658_Alias", PasajeroClassText.ClassAlias); lSInfo.AddOIDArgument("p_thisPasajero", false, "Pasajero", "Clas_1348178542592658Ser_3Arg_1_Alias", PasajeroClassText.Edit_instance_P_thisPasajeroArgumentAlias); try { lSInfo.XML2ON(xmlReader, dtdVersion, true); } catch (Exception e) { throw new ONServiceArgumentsException(e, "Clas_1348178542592658_Alias", PasajeroClassText.ClassAlias, "Clas_1348178542592658Ser_3_Alias", PasajeroClassText.Edit_instanceServiceAlias); } PasajeroOid lP_thisPasajeroArg = (PasajeroOid) ((ONArgumentInfo) lSInfo.mArgumentList["p_thisPasajero"]).Value; // Create Context ONServiceContext lOnContext = new ONServiceContext(); lOnContext.OidAgent = agentOid; // Execute Service PasajeroInstance lInstance = null; try { ONFilterList lFilterList = new ONFilterList(); PasajeroInstance lThisInstance = new PasajeroInstance(lOnContext); if (lP_thisPasajeroArg != null) { lFilterList = new ONFilterList(); lFilterList.Add("HorizontalVisibility", new PasajeroHorizontalVisibility()); lThisInstance = lP_thisPasajeroArg.GetInstance(lOnContext, lFilterList); if (lThisInstance == null) throw new ONInstanceNotExistException(null, "Clas_1348178542592658_Alias", PasajeroClassText.ClassAlias); } using (PasajeroServer lServer = new PasajeroServer(lOnContext, lThisInstance)) { lServer.Edit_instanceServ(lP_thisPasajeroArg); lInstance = lServer.Instance; } ticket = lOnContext.GetTicket(dtdVersion, clientName); } catch (SecurityException) { throw new ONAccessAgentValidationException(null); } catch { throw; } // Write Oid if (dtdVersion >= 3.1) { if (lInstance != null) ON2XML(xmlWriter, lInstance.Oid, dtdVersion, ONXml.XMLTAG_OIDFIELD); } // Write Outbound Arguments xmlWriter.WriteStartElement("Arguments"); // Write Outbound Arguments xmlWriter.WriteEndElement(); // Arguments }
public void Create_instanceServ(ref string ticket, ref ONOid agentOid, XmlReader xmlReader, XmlWriter xmlWriter, double dtdVersion, string clientName) { // Process the service arguments ONServiceInfo lSInfo = new ONServiceInfo("Clas_1348178673664478Ser_1_Alias", RevisionPasajeroClassText.Create_instanceServiceAlias, "Clas_1348178673664478_Alias", RevisionPasajeroClassText.ClassAlias); lSInfo.AddOIDArgument("p_agrPasajeroAeronave", false, "PasajeroAeronave", "Clas_1348178673664478Ser_1Arg_3_Alias", RevisionPasajeroClassText.Create_instance_P_agrPasajeroAeronaveArgumentAlias); lSInfo.AddOIDArgument("p_agrRevision", false, "Revision", "Clas_1348178673664478Ser_1Arg_4_Alias", RevisionPasajeroClassText.Create_instance_P_agrRevisionArgumentAlias); lSInfo.AddDataValuedArgument("p_atrid_RevisionPasajero", false, DataTypeEnumerator.Autonumeric, 0, "Clas_1348178673664478Ser_1Arg_1_Alias", RevisionPasajeroClassText.Create_instance_P_atrid_RevisionPasajeroArgumentAlias); try { lSInfo.XML2ON(xmlReader, dtdVersion, true); } catch (Exception e) { throw new ONServiceArgumentsException(e, "Clas_1348178673664478_Alias", RevisionPasajeroClassText.ClassAlias, "Clas_1348178673664478Ser_1_Alias", RevisionPasajeroClassText.Create_instanceServiceAlias); } PasajeroAeronaveOid lP_agrPasajeroAeronaveArg = (PasajeroAeronaveOid) ((ONArgumentInfo) lSInfo.mArgumentList["p_agrPasajeroAeronave"]).Value; RevisionOid lP_agrRevisionArg = (RevisionOid) ((ONArgumentInfo) lSInfo.mArgumentList["p_agrRevision"]).Value; ONInt lP_atrid_RevisionPasajeroArg = (ONInt) ((ONArgumentInfo) lSInfo.mArgumentList["p_atrid_RevisionPasajero"]).Value; // Create Context ONServiceContext lOnContext = new ONServiceContext(); lOnContext.OidAgent = agentOid; // Execute Service RevisionPasajeroInstance lInstance = null; try { ONFilterList lFilterList = new ONFilterList(); PasajeroAeronaveInstance lp_agrPasajeroAeronaveInstance = new PasajeroAeronaveInstance(lOnContext); if (lP_agrPasajeroAeronaveArg != null) { lFilterList = new ONFilterList(); lFilterList.Add("HorizontalVisibility", new PasajeroAeronaveHorizontalVisibility()); lp_agrPasajeroAeronaveInstance = lP_agrPasajeroAeronaveArg.GetInstance(lOnContext, lFilterList); if (lp_agrPasajeroAeronaveInstance == null) throw new ONInstanceNotExistException(null, "Clas_1348178542592177_Alias", PasajeroAeronaveClassText.ClassAlias); } RevisionInstance lp_agrRevisionInstance = new RevisionInstance(lOnContext); if (lP_agrRevisionArg != null) { lFilterList = new ONFilterList(); lFilterList.Add("HorizontalVisibility", new RevisionHorizontalVisibility()); lp_agrRevisionInstance = lP_agrRevisionArg.GetInstance(lOnContext, lFilterList); if (lp_agrRevisionInstance == null) throw new ONInstanceNotExistException(null, "Clas_1348178542592347_Alias", RevisionClassText.ClassAlias); } using (RevisionPasajeroServer lServer = new RevisionPasajeroServer(lOnContext, null)) { lServer.Create_instanceServ(lP_agrPasajeroAeronaveArg,lP_agrRevisionArg,lP_atrid_RevisionPasajeroArg); lInstance = lServer.Instance; } ticket = lOnContext.GetTicket(dtdVersion, clientName); } catch (SecurityException) { throw new ONAccessAgentValidationException(null); } catch { throw; } // Write Oid if (dtdVersion >= 3.1) { if (lInstance != null) ON2XML(xmlWriter, lInstance.Oid, dtdVersion, ONXml.XMLTAG_OIDFIELD); } // Write Outbound Arguments xmlWriter.WriteStartElement("Arguments"); // Write Outbound Arguments xmlWriter.WriteEndElement(); // Arguments }
public void Edit_instanceServ(ref string ticket, ref ONOid agentOid, XmlReader xmlReader, XmlWriter xmlWriter, double dtdVersion, string clientName) { // Process the service arguments ONServiceInfo lSInfo = new ONServiceInfo("Clas_1348178411520734Ser_3_Alias", AeronaveClassText.Edit_instanceServiceAlias, "Clas_1348178411520734_Alias", AeronaveClassText.ClassAlias); lSInfo.AddOIDArgument("p_thisAeronave", false, "Aeronave", "Clas_1348178411520734Ser_3Arg_1_Alias", AeronaveClassText.Edit_instance_P_thisAeronaveArgumentAlias); try { lSInfo.XML2ON(xmlReader, dtdVersion, true); } catch (Exception e) { throw new ONServiceArgumentsException(e, "Clas_1348178411520734_Alias", AeronaveClassText.ClassAlias, "Clas_1348178411520734Ser_3_Alias", AeronaveClassText.Edit_instanceServiceAlias); } AeronaveOid lP_thisAeronaveArg = (AeronaveOid)((ONArgumentInfo)lSInfo.mArgumentList["p_thisAeronave"]).Value; // Create Context ONServiceContext lOnContext = new ONServiceContext(); lOnContext.OidAgent = agentOid; // Execute Service AeronaveInstance lInstance = null; try { ONFilterList lFilterList = new ONFilterList(); AeronaveInstance lThisInstance = new AeronaveInstance(lOnContext); if (lP_thisAeronaveArg != null) { lFilterList = new ONFilterList(); lFilterList.Add("HorizontalVisibility", new AeronaveHorizontalVisibility()); lThisInstance = lP_thisAeronaveArg.GetInstance(lOnContext, lFilterList); if (lThisInstance == null) { throw new ONInstanceNotExistException(null, "Clas_1348178411520734_Alias", AeronaveClassText.ClassAlias); } } using (AeronaveServer lServer = new AeronaveServer(lOnContext, lThisInstance)) { lServer.Edit_instanceServ(lP_thisAeronaveArg); lInstance = lServer.Instance; } ticket = lOnContext.GetTicket(dtdVersion, clientName); } catch (SecurityException) { throw new ONAccessAgentValidationException(null); } catch { throw; } // Write Oid if (dtdVersion >= 3.1) { if (lInstance != null) { ON2XML(xmlWriter, lInstance.Oid, dtdVersion, ONXml.XMLTAG_OIDFIELD); } } // Write Outbound Arguments xmlWriter.WriteStartElement("Arguments"); // Write Outbound Arguments xmlWriter.WriteEndElement(); // Arguments }
public void SetPasswordServ(ref string ticket, ref ONOid agentOid, XmlReader xmlReader, XmlWriter xmlWriter, double dtdVersion, string clientName) { // Process the service arguments ONServiceInfo lSInfo = new ONServiceInfo("Clas_1348605050880238Ser_4_Alias", AdministradorClassText.SetPasswordServiceAlias, "Clas_1348605050880238_Alias", AdministradorClassText.ClassAlias); lSInfo.AddOIDArgument("p_thisAdministrador", false, "Administrador", "Clas_1348605050880238Ser_4Arg_1_Alias", AdministradorClassText.SetPassword_P_thisAdministradorArgumentAlias); lSInfo.AddDataValuedArgument("p_NewPassword", false, DataTypeEnumerator.Password, 0, "Clas_1348605050880238Ser_4Arg_2_Alias", AdministradorClassText.SetPassword_P_NewPasswordArgumentAlias); try { lSInfo.XML2ON(xmlReader, dtdVersion, true); } catch (Exception e) { throw new ONServiceArgumentsException(e, "Clas_1348605050880238_Alias", AdministradorClassText.ClassAlias, "Clas_1348605050880238Ser_4_Alias", AdministradorClassText.SetPasswordServiceAlias); } AdministradorOid lP_thisAdministradorArg = (AdministradorOid) ((ONArgumentInfo) lSInfo.mArgumentList["p_thisAdministrador"]).Value; ONString lP_NewPasswordArg = (ONString) ((ONArgumentInfo) lSInfo.mArgumentList["p_NewPassword"]).Value; // Create Context ONServiceContext lOnContext = new ONServiceContext(); lOnContext.OidAgent = agentOid; // Execute Service AdministradorInstance lInstance = null; try { ONFilterList lFilterList = new ONFilterList(); AdministradorInstance lThisInstance = new AdministradorInstance(lOnContext); if (lP_thisAdministradorArg != null) { lFilterList = new ONFilterList(); lFilterList.Add("HorizontalVisibility", new AdministradorHorizontalVisibility()); lThisInstance = lP_thisAdministradorArg.GetInstance(lOnContext, lFilterList); if (lThisInstance == null) throw new ONInstanceNotExistException(null, "Clas_1348605050880238_Alias", AdministradorClassText.ClassAlias); } using (AdministradorServer lServer = new AdministradorServer(lOnContext, lThisInstance)) { lServer.SetPasswordServ(lP_thisAdministradorArg,lP_NewPasswordArg); lInstance = lServer.Instance; } ticket = lOnContext.GetTicket(dtdVersion, clientName); } catch (SecurityException) { throw new ONAccessAgentValidationException(null); } catch { throw; } // Write Oid if (dtdVersion >= 3.1) { if (lInstance != null) ON2XML(xmlWriter, lInstance.Oid, dtdVersion, ONXml.XMLTAG_OIDFIELD); } // Write Outbound Arguments xmlWriter.WriteStartElement("Arguments"); // Write Outbound Arguments xmlWriter.WriteEndElement(); // Arguments }
public void MVAgentValidationServ(ref string ticket, ref ONOid agentOid, XmlReader xmlReader, XmlWriter xmlWriter, double dtdVersion, string clientName) { // Process the service arguments ONServiceInfo lSInfo = new ONServiceInfo("", "MVAgentValidationServ", "Clas_1348605050880238_Alias", "Administrador"); if (dtdVersion >= 3.1) lSInfo.AddOIDArgument("agent", false, "Administrador", "", "Agent"); lSInfo.AddDataValuedArgument("PASSWORD", false, DataTypeEnumerator.Password, LENGTHPASSWORDADMINISTRADOR, "", "PASSWORD"); try { lSInfo.XML2ON(xmlReader, dtdVersion, true); } catch (Exception e) { if(e.GetType() == typeof(ONInstanceNotExistException)) throw; else throw new ONServiceArgumentsException(e, "Clas_1348605050880238_Alias", "Administrador", "", "MVAgentValidation"); } if (dtdVersion >= 3.1) agentOid = ((ONArgumentInfo) lSInfo.mArgumentList["agent"]).Value as AdministradorOid; AdministradorOid lAgentOid = agentOid as AdministradorOid; ONString lPasswordArg = (ONString) ((ONArgumentInfo) lSInfo.mArgumentList["PASSWORD"]).Value; // Create Context ONServiceContext lOnContext = new ONServiceContext(); lOnContext.OidAgent = agentOid; // Execute Service AdministradorInstance lInstance = null; // Find Agent Instance AdministradorInstance lAgentInstance = lAgentOid.GetInstance(lOnContext); if (lAgentInstance == null) throw new ONInstanceNotExistException(null, "", ClassName); using (AdministradorServer lServer = new AdministradorServer(lOnContext, lAgentInstance)) { lServer.MVAgentValidationServ(lAgentOid, lPasswordArg); lInstance = lServer.Instance; } ticket = lOnContext.GetTicket(dtdVersion, clientName); // Write Oid if (dtdVersion >= 3.1) ON2XML(xmlWriter, lInstance.Oid, dtdVersion, ONXml.XMLTAG_OIDFIELD); // Write Outbound Arguments xmlWriter.WriteStartElement("Arguments"); xmlWriter.WriteEndElement(); // Arguments }