chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xi Wang <wang.xi.polyt...@gmail.com>
Subject Authentication error connect to CMIS Web Services endpoint with using DotCMIS v0.7
Date Fri, 17 Mar 2017 08:55:02 GMT
Hi all,

I tried to use the CMIS Web Service endpoint demo released in
*https://chemistry.apache.org/dotnet/getting-started-with-dotcmis.html
<https://chemistry.apache.org/dotnet/getting-started-with-dotcmis.html>*
to access to my database, but I got the authentication error as below:
The HTTP request is unauthorized with client authentication scheme
'Anonymous'. The authentication header received from the server was 'Basic
realm="Authentication required"'.

I'm sure I have specified the username&pwd correctly to my C# application,
please see the code below:

using DotCMIS;
using DotCMIS.Client;
using DotCMIS.Client.Impl;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

/*
*/

namespace testDotCmis
{
    class Program
    {
        static void Main(string[] args)
        {
            var parameters = new Dictionary<string, string>();

            parameters[SessionParameter.BindingType] =
BindingType.WebServices;
            parameters[SessionParameter.WebServicesRepositoryService] =
"https://[host address]/repositoryservice?wsdl";
            parameters[SessionParameter.WebServicesAclService] = "https://[host
address]/aclservice?wsdl";
            parameters[SessionParameter.WebServicesDiscoveryService] =
"https://[host address]/discoveryservice?wsdl";
            parameters[SessionParameter.WebServicesMultifilingService] =
"https://[host address]/multifilingservice?wsdl";
            parameters[SessionParameter.WebServicesNavigationService] =
"https://[host address]/navigationservice?wsdl";
            parameters[SessionParameter.WebServicesObjectService] =
"https://[host address]/objectservice?wsdl";
            parameters[SessionParameter.WebServicesPolicyService] =
"https://[host address]/policyservice?wsdl";
            parameters[SessionParameter.WebServicesRelationshipService] =
"https://[host address]/relationshipservice?wsdl";
            parameters[SessionParameter.WebServicesVersioningService] =
"https://[host address]/versioningservice?wsdl";
            parameters[SessionParameter.User] = "[username]";
            parameters[SessionParameter.Password] = "[pwd]";


            SessionFactory factory = SessionFactory.NewInstance();

            var repoInfoList = factory.GetRepositories(parameters);
            Console.WriteLine("Test");
            Console.ReadKey();
        }
    }
}

I also tested with Atompub&browser, they worked perfectly.

            var parameters = new Dictionary<string, string>();
            parameters[SessionParameter.BindingType] = BindingType.Browser;
            parameters[SessionParameter.BrowserUrl] = "https://[host
address]/browser";
            parameters[SessionParameter.User] = "[username]";
            parameters[SessionParameter.Password] = "[pwd]";
            SessionFactory factory = SessionFactory.NewInstance();

            var repoInfoList = factory.GetRepositories(parameters);

Could you help with this, please?

-- 
Best Regards.

Xi
-----------------------------------------------------------------
Polytech Nice-Sophia Antipolis
Western University
41 RUE DIDOT
75014 Paris, France

Linkin: Xi WANG <https://www.linkedin.com/in/xi-wang-a8577683>
Tel: *(+33)6 66 47 84 59 <%28%2B33%296%2066%2047%2084%2059>*
Mail: *wang.xi.polytech@gmail.com <wang.xi.polytech@gmail.com>*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message