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_1347649273856884Ser_1_Alias", NaveNodrizaClassText.Create_instanceServiceAlias, "Clas_1347649273856884_Alias", NaveNodrizaClassText.ClassAlias); lSInfo.AddDataValuedArgument("p_atrid_NaveNodriza", false, DataTypeEnumerator.Autonumeric, 0, "Clas_1347649273856884Ser_1Arg_1_Alias", NaveNodrizaClassText.Create_instance_P_atrid_NaveNodrizaArgumentAlias); lSInfo.AddDataValuedArgument("p_atrNombre_NaveNodriza", false, DataTypeEnumerator.String, 100, "Clas_1347649273856884Ser_1Arg_2_Alias", NaveNodrizaClassText.Create_instance_P_atrNombre_NaveNodrizaArgumentAlias); try { lSInfo.XML2ON(xmlReader, dtdVersion, true); } catch (Exception e) { throw new ONServiceArgumentsException(e, "Clas_1347649273856884_Alias", NaveNodrizaClassText.ClassAlias, "Clas_1347649273856884Ser_1_Alias", NaveNodrizaClassText.Create_instanceServiceAlias); } ONInt lP_atrid_NaveNodrizaArg = (ONInt)((ONArgumentInfo)lSInfo.mArgumentList["p_atrid_NaveNodriza"]).Value; ONString lP_atrNombre_NaveNodrizaArg = (ONString)((ONArgumentInfo)lSInfo.mArgumentList["p_atrNombre_NaveNodriza"]).Value; // Create Context ONServiceContext lOnContext = new ONServiceContext(); lOnContext.OidAgent = agentOid; // Execute Service NaveNodrizaInstance lInstance = null; try { using (NaveNodrizaServer lServer = new NaveNodrizaServer(lOnContext, null)) { lServer.Create_instanceServ(lP_atrid_NaveNodrizaArg, lP_atrNombre_NaveNodrizaArg); 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_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 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 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_1347649273856884Ser_1_Alias", NaveNodrizaClassText.Create_instanceServiceAlias, "Clas_1347649273856884_Alias", NaveNodrizaClassText.ClassAlias); lSInfo.AddDataValuedArgument("p_atrid_NaveNodriza", false, DataTypeEnumerator.Autonumeric, 0, "Clas_1347649273856884Ser_1Arg_1_Alias", NaveNodrizaClassText.Create_instance_P_atrid_NaveNodrizaArgumentAlias); lSInfo.AddDataValuedArgument("p_atrNombre_NaveNodriza", false, DataTypeEnumerator.String, 100, "Clas_1347649273856884Ser_1Arg_2_Alias", NaveNodrizaClassText.Create_instance_P_atrNombre_NaveNodrizaArgumentAlias); try { lSInfo.XML2ON(xmlReader, dtdVersion, true); } catch (Exception e) { throw new ONServiceArgumentsException(e, "Clas_1347649273856884_Alias", NaveNodrizaClassText.ClassAlias, "Clas_1347649273856884Ser_1_Alias", NaveNodrizaClassText.Create_instanceServiceAlias); } ONInt lP_atrid_NaveNodrizaArg = (ONInt) ((ONArgumentInfo) lSInfo.mArgumentList["p_atrid_NaveNodriza"]).Value; ONString lP_atrNombre_NaveNodrizaArg = (ONString) ((ONArgumentInfo) lSInfo.mArgumentList["p_atrNombre_NaveNodriza"]).Value; // Create Context ONServiceContext lOnContext = new ONServiceContext(); lOnContext.OidAgent = agentOid; // Execute Service NaveNodrizaInstance lInstance = null; try { using (NaveNodrizaServer lServer = new NaveNodrizaServer(lOnContext, null)) { lServer.Create_instanceServ(lP_atrid_NaveNodrizaArg,lP_atrNombre_NaveNodrizaArg); 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 MVChangePassWordServ(ref string ticket, ref ONOid agentOid, XmlReader xmlReader, XmlWriter xmlWriter, double dtdVersion, string clientName) { // Process the service arguments ONServiceInfo lSInfo = new ONServiceInfo("", "MVChangePassWord", "Clas_1348605050880238_Alias", "Administrador"); lSInfo.AddDataValuedArgument("oldpassword", false, DataTypeEnumerator.Password, LENGTHPASSWORDADMINISTRADOR, "", "oldpassword"); lSInfo.AddDataValuedArgument("newpassword", false, DataTypeEnumerator.Password, LENGTHPASSWORDADMINISTRADOR, "", "newpassword"); try { lSInfo.XML2ON(xmlReader, dtdVersion, true); } catch (Exception e) { throw new ONServiceArgumentsException(e, "Clas_1348605050880238_Alias", "Administrador", "", "MVChangePassWord"); } ONString lOldpasswordArg = (ONString) ((ONArgumentInfo) lSInfo.mArgumentList["oldpassword"]).Value; ONString lNewpasswordArg = (ONString) ((ONArgumentInfo) lSInfo.mArgumentList["newpassword"]).Value; // Create Context ONServiceContext lOnContext = new ONServiceContext(); lOnContext.OidAgent = agentOid; // Execute Service AdministradorInstance lInstance = null; try { // Find Agent Instance AdministradorInstance lAgentInstance = (agentOid as AdministradorOid).GetInstance(lOnContext); if (lAgentInstance == null) throw new ONInstanceNotExistException(null, "", ClassName); using (AdministradorServer lServer = new AdministradorServer(lOnContext, lAgentInstance)) { lServer.MVChangePassWordServ(lOldpasswordArg, lNewpasswordArg); lInstance = lServer.Instance; } ticket = lOnContext.GetTicket(dtdVersion, clientName); } catch (SecurityException) { throw new ONAccessAgentValidationException(null); } catch { throw; } // Write Oid if (dtdVersion >= 3.1) ON2XML(xmlWriter, lInstance.Oid, dtdVersion, ONXml.XMLTAG_OIDFIELD); // Write Outbound Arguments xmlWriter.WriteStartElement("Arguments"); xmlWriter.WriteEndElement(); // Arguments }