public string Execute() { var helper = new Helper(); _proxy = helper.GetProxy <LOLServiceSoap>(_ambiente.LolUri, _ambiente.Username, _ambiente.Password); var fake = new OperationContextScope((IContextChannel)_proxy); var property = new HttpRequestMessageProperty(); property.Headers.Add("customerid", _ambiente.customerid); property.Headers.Add("smuser", _ambiente.smuser); property.Headers.Add("costcenter", _ambiente.costcenter); property.Headers.Add("billingcenter", _ambiente.billingcenter); property.Headers.Add("idsender", _ambiente.idsender); property.Headers.Add("contracttype", _ambiente.contracttype); property.Headers.Add("sendersystem", _ambiente.sendersystem); property.Headers.Add("usertype", _ambiente.usertype); OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = property; var result = _proxy.RecuperaIdRichiesta(); return(result.IDRichiesta); }
public NpceOperationResult Execute() { var helper = new Helper(); _proxy = helper.GetProxy <LOLServiceSoap>(_ambiente.LolUri, _ambiente.Username, _ambiente.Password); LOLSubmit lolSubmit = new LOLSubmit(); SetMittente(lolSubmit); SetDestinatari(lolSubmit); SetDocumenti(lolSubmit); SetOpzioni(lolSubmit); if (_servizio.TipoServizio.Descrizione == "Posta1") { SetPosta1(lolSubmit); } if (_servizio.PagineBollettini != null && _servizio.PagineBollettini.Count() > 0) { SetBollettini(lolSubmit); } var fake = new OperationContextScope((IContextChannel)_proxy); var headers = GetHttpHeaders(_ambiente); OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = headers; //OperationContext.Current.Channel.OperationTimeout = TimeSpan.FromMinutes(2); var invioResult = _proxy.Invio(_idRichiesta, string.Empty, lolSubmit); return(CreateResult(NpceOperation.Invio, invioResult.CEResult.Code, invioResult.CEResult.Code, invioResult.IDRichiesta, null, invioResult.GuidUtente)); }
public NpceOperationResult Execute() { var helper = new Helper(); _proxy = helper.GetProxy <LOLServiceSoap>(_ambiente.LolUri, _ambiente.Username, _ambiente.Password); var listRichieste = new List <Richiesta>(); listRichieste.Add(new Richiesta() { GuidUtente = _servizio.GuidUtente, IDRichiesta = _idRichiesta }); PreConfermaRequest request = new PreConfermaRequest { Richieste = listRichieste.ToArray(), autoConferma = _autoConferma }; var fake = new OperationContextScope((IContextChannel)_proxy); var headers = GetHttpHeaders(_ambiente); OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = headers; var preConfermaResult = _proxy.PreConferma(request); return(CreateResult(_autoConferma ? NpceOperation.PreConfermaWithAutoconfirm : NpceOperation.PreConferma, preConfermaResult.PreConfermaResult.CEResult.Code, preConfermaResult.PreConfermaResult.CEResult.Code, _idRichiesta, preConfermaResult.PreConfermaResult.IdOrdine, null)); }