public VtDocs.BusinessServices.Entities.Response LogoutUser(VtDocs.BusinessServices.Entities.Request request) { VtDocs.BusinessServices.Entities.Response response = new VtDocs.BusinessServices.Entities.Response(); try { using (DocsPaWS.DocsPaWebService ws = new DocsPaWS.DocsPaWebService()) { if (ws.Logoff(request.InfoUtente.userId, request.InfoUtente.idAmministrazione, string.Empty, request.InfoUtente.dst)) { } } } catch (Exception ex) { System.Web.Services.Protocols.SoapException soapEx = DocsPaUtils.Exceptions.SoapExceptionFactory.Create(ex); if (request.TrowOnError) { throw soapEx; } else { response.Exception = soapEx.ToString(); } } return(response); }
public static bool canaleWSAperto(DocsPaWS.DocsPaWebService ws) { if (ws == null) { apriCanaleWS(out ws); } return(ws != null); }
public void SaveMTextFQNTest() { DocsPaWS.DocsPaWebService ws = new DocsPaWS.DocsPaWebService(); ws.SetMTextFullQualifiedName(new DocsPaWS.MTextDocumentInfo() { DocumentDocNumber = "1", DocumentVersionId = "1", FullQualifiedName = @"\TESTODIPROVA" }); }
public void LoadMTextFQNTest() { DocsPaWS.MTextDocumentInfo docInfo = new DocsPaWS.MTextDocumentInfo() { DocumentDocNumber = "1", DocumentVersionId = "1", FullQualifiedName = String.Empty }; DocsPaWS.DocsPaWebService ws = new DocsPaWS.DocsPaWebService(); DocsPaWS.MTextDocumentInfo doc = ws.GetMTextFullQualifiedName(docInfo); Assert.IsTrue(!String.IsNullOrEmpty(doc.FullQualifiedName) && doc.FullQualifiedName == @"\TESTODIPROVA"); }
public static bool Logoff(DocsPaVO.utente.Utente Utente, DocsPaWS.DocsPaWebService ws) { // true - Logoff effettuato // false - errore bool retValue = false; try { verificaUtente(Utente); ws.Logoff(Utente.userId, Utente.idAmministrazione, Utente.sessionID, Utente.dst); retValue = true; } catch (System.SystemException ex) { System.Diagnostics.Debug.Write(ex.Message); retValue = false; } return(retValue); }
public VtDocs.BusinessServices.Entities.Authentication.GetLoginResponse LoginUser(VtDocs.BusinessServices.Entities.Authentication.GetLoginRequest request) { VtDocs.BusinessServices.Entities.Authentication.GetLoginResponse response = new VtDocs.BusinessServices.Entities.Authentication.GetLoginResponse(); try { using (DocsPaWS.DocsPaWebService ws = new DocsPaWS.DocsPaWebService()) { DocsPaVO.utente.Utente user; string ipAddress; response.Result = ws.Login(request.Login, out user, request.Forced, request.WebSessionId, out ipAddress); response.User = user; response.IpAddress = ipAddress; } } catch (Exception ex) { System.Web.Services.Protocols.SoapException soapEx = DocsPaUtils.Exceptions.SoapExceptionFactory.Create(ex); if (request.TrowOnError) { throw soapEx; } else { response.Exception = soapEx.ToString(); response.User = null; response.Result = DocsPaVO.utente.UserLogin.LoginResult.APPLICATION_ERROR; response.IpAddress = null; } } return(response); }
public void GenerateExcelFile() { DocsPaWS.DocsPaWebService ws = new DocsPaWS.DocsPaWebService(); ws.Timeout = System.Threading.Timeout.Infinite; PrintReportRequest request = new PrintReportRequest() { ContextName = "RicercaModelliTrasmissione", ReportType = ReportTypeEnum.Excel, SearchFilters = new FiltroRicerca[] { new FiltroRicerca() { argomento = FiltriModelliTrasmissione.ID_REGISTRO.ToString(), valore = "86107" }, new FiltroRicerca() { argomento = FiltriModelliTrasmissione.CODICE_MODELLO.ToString(), valore = "384" } }, SubTitle = "Sotto titolo", Title = "Titolo", UserInfo = new InfoUtente() { idAmministrazione = "361" } }; //PrintReportResponse response = ws.GenerateReportModelliTrasmissione(request); PrintReportResponse response = new PrintReportResponse(); File.WriteAllBytes(@"C:\Report.xml", response.Document.content); Assert.IsNotNull(response); }
public static void chiudiCanaleWS(DocsPaWS.DocsPaWebService ws) { ws.Dispose(); }
public static void apriCanaleWS(out DocsPaWS.DocsPaWebService ws) { ws = new DocsPaWS.DocsPaWebService(); }
public static bool insertCorrEsterno(string Codice, string Codrubrica, string Descrizione, string Tipo_urp, string Email, string Indirizzo, string Cap, string Citta, string Prov, string Cognome, string Nome, DocsPaVO.utente.InfoUtente infoUtente, string idRegistro, DocsPaWS.DocsPaWebService ws) { #region new DocsPaVO.utente.Corrispondente resultCorr = null; DocsPaVO.utente.Corrispondente newCorr = null; //DocsPaVO.utente.InfoUtente infoUtente = this.getInfoUtente(this.Utente, this.Ruolo); //string idRegistro = this.Registro.systemId; try { switch (Tipo_urp) { case "U": { newCorr = new DocsPaVO.utente.UnitaOrganizzativa(); break; } case "P": { newCorr = new DocsPaVO.utente.Utente(); ((DocsPaVO.utente.Utente)newCorr).cognome = Cognome; ((DocsPaVO.utente.Utente)newCorr).nome = Nome; break; } default: break; } newCorr.codiceCorrispondente = Codice; newCorr.codiceRubrica = Codrubrica; newCorr.descrizione = Descrizione; newCorr.tipoCorrispondente = Tipo_urp; newCorr.email = Email; #region dati costanti newCorr.idAmministrazione = infoUtente.idAmministrazione; newCorr.idRegistro = idRegistro; newCorr.codiceAmm = ""; newCorr.codiceAOO = ""; //dati canale DocsPaVO.utente.Canale canale = new DocsPaVO.utente.Canale(); canale.systemId = "2"; //EMAIL newCorr.canalePref = canale; /*massimo digregorio: * necessari sulla 2.0... * sulla 3 non ho trovato nulla in riferimento, quindi non li gestisco * newCorr.tipoIE = "E"; * newCorr.tipoCorrispondente = "S"; */ #endregion dati costanti //dati dettagli corrispondente DocsPaVO.addressbook.DettagliCorrispondente dettagli = new DocsPaVO.addressbook.DettagliCorrispondente(); dettagli.Corrispondente.AddCorrispondenteRow( Indirizzo, Citta, Cap, Prov, "", //nazionalita "", //txt_telefono1 "", //txt_telefono2 "", //txt_fax "", //txt_codfisc "", //txt_note "", //località "", // luogoNascita "", // dataNascita "", // titolo //"",// partita iva ""); // codice ipa newCorr.info = dettagli; newCorr.dettagli = true; //eseguo l'inserimento resultCorr = ws.AddressbookInsertCorrispondente(newCorr, null, infoUtente); } catch (Exception e) { throw new Exception("Errore in inserimento corrispondente esterno - DocsPaWSLite.asmx ERRORE: " + e.Message); } if (resultCorr != null && resultCorr.errore == null) { return(true); } else { return(false); } #endregion new }
/// <summary> /// /// </summary> private void apriCanaleWS() { this._ws = new DocsPaWS.DocsPaWebService(); }