Ejemplo n.º 1
0
        public IItJakubService GetAuthenticatedClient(string username, string commToken)
        {
            var endpoint = m_configurationProvider.GetEndpointAddress(MainServiceEndpointNameAuthenticated);
            var binding  = m_configurationProvider.GetBasicHttpsBindingUserNameAuthentication();
            var client   = new ItJakubServiceClient(binding, endpoint);

            if (client.ClientCredentials == null)
            {
                throw new ArgumentException("Cannot set credentials for client");
            }

            client.ClientCredentials.UserName.UserName = username;
            client.ClientCredentials.UserName.Password = commToken;
            return(client);
        }
Ejemplo n.º 2
0
        public LemmatizationServiceClient GetLemmatizationClient()
        {
            var endpoint = m_configurationProvider.GetEndpointAddress(LemmatizationServiceEndpointName);
            var binding  = new BasicHttpBinding();

            return(new LemmatizationServiceClient(binding, endpoint));
        }