Exemplo n.º 1
0
        static void Main(string[] args)
        {
            using (AppTourWebService.AppTourWSClient ws = new AppTourWebService.AppTourWSClient())
            {
                ws.Open();

                UserModel user = ws.Authentication("rjcarneiro", "carneiro123@");

                ws.Close();
            }
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            AppTourWSClient authService  = new AppTourWebService.AppTourWSClient();
            string          cookieHeader = "";

            using (OperationContextScope scope = new OperationContextScope(authService.InnerChannel))
            {
                HttpRequestMessageProperty requestProperty = new HttpRequestMessageProperty();
                OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = requestProperty;

                UserModel isGood = authService.Authentication("jonas", "jona");

                MessageProperties           properties       = OperationContext.Current.IncomingMessageProperties;
                HttpResponseMessageProperty responseProperty = (HttpResponseMessageProperty)properties[HttpResponseMessageProperty.Name];
                cookieHeader = responseProperty.Headers[HttpResponseHeader.SetCookie];
            }
        }