SharePoint 2013 的 CMIS 工作台/DotCMIS 问题
- 某些子文件夹无法 GetChildren()
i.e. /.../001
- 无法执行 cmis:query
Select * From cmis:folder
1. 部分子文件夹不能GetChildren()
DotCMIS.Client.Impl.Folder.GetChildren() 异常
通过 Web 服务端点(文件夹 /.../001)
DotCMIS.Exceptions.CmisConstraintException: Cannot complete this action. Please try again.
at DotCMIS.Binding.WebServices.NavigationService.GetChildren(String repositoryId, String folderId, String filter, String orderBy, Nullable`1 includeAllowableActions, Nullable`1 includeRelationships, String renditionFilter, Nullable`1 includePathSegment, Nullable`1 maxItems, Nullable`1 skipCount, IExtensionsData extension) in D:\Projects\CMIS\DotCMIS\binding\webservices\webservices.cs:line 653
at DotCMIS.Client.Impl.Folder.<>c__DisplayClass4.<GetChildren>b__3(Int64 maxNumItems, Int64 skipCount) in D:\Projects\CMIS\DotCMIS\client\client-objects.cs:line 1124
at DotCMIS.Client.Impl.PageFetcher`1.FetchNextPage(Int64 skipCount) in D:\Projects\CMIS\DotCMIS\client\client-utils.cs:line 563
at DotCMIS.Client.Impl.AbstractEnumerator`1.GetCurrentPage() in D:\Projects\CMIS\DotCMIS\client\client-utils.cs:line 528
at DotCMIS.Client.Impl.CollectionEnumerator`1.MoveNext() in D:\Projects\CMIS\DotCMIS\client\client-utils.cs:line 608
at ConsoleTest.Module1.Demo(ENDPOINT_TYPE endpoint_type) in D:\Projects\CMIS\ConsoleTest\Module1.vb:line 396
通过 AtomPub 端点(文件夹 /.../001)
DotCMIS.Exceptions.CmisConnectionException: Parsing exception! ---> System.Xml.XmlException: An error has occurred while opening external DTD 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd': The remote server returned an error: (500) Internal Server Error. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
at System.Net.HttpWebRequest.GetResponse()
at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenAndPush(Uri uri)
at System.Xml.XmlTextReaderImpl.PushExternalEntityOrSubset(String publicId, String systemId, Uri baseUri, String entityName)
--- End of inner exception stack trace ---
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.PushExternalEntityOrSubset(String publicId, String systemId, Uri baseUri, String entityName)
at System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubset(String systemId, String publicId)
at System.Xml.XmlTextReaderImpl.DtdParserProxy.System.Xml.IDtdParserAdapter.PushExternalSubset(String systemId, String publicId)
at System.Xml.DtdParser.ParseExternalSubset()
at System.Xml.DtdParser.ParseInDocumentDtd(Boolean saveInternalSubset)
at System.Xml.DtdParser.Parse(Boolean saveInternalSubset)
at System.Xml.DtdParser.System.Xml.IDtdParser.ParseInternalDtd(IDtdParserAdapter adapter, Boolean saveInternalSubset)
at System.Xml.XmlTextReaderImpl.ParseDtd()
at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlReader.MoveToContent()
at System.Xml.XmlReader.IsStartElement()
at DotCMIS.Binding.AtomPub.AtomPubParser.Parse() in D:\Projects\CMIS\DotCMIS\binding\atompub\atompub-parser.cs:line 90
at DotCMIS.Binding.AtomPub.AbstractAtomPubService.Parse[T](Stream stream) in D:\Projects\CMIS\DotCMIS\binding\atompub\atompub.cs:line 418
--- End of inner exception stack trace ---
at DotCMIS.Binding.AtomPub.AbstractAtomPubService.Parse[T](Stream stream) in D:\Projects\CMIS\DotCMIS\binding\atompub\atompub.cs:line 422
at DotCMIS.Binding.AtomPub.NavigationService.GetChildren(String repositoryId, String folderId, String filter, String orderBy, Nullable`1 includeAllowableActions, Nullable`1 includeRelationships, String renditionFilter, Nullable`1 includePathSegment, Nullable`1 maxItems, Nullable`1 skipCount, IExtensionsData extension) in D:\Projects\CMIS\DotCMIS\binding\atompub\atompub.cs:line 1134
at DotCMIS.Client.Impl.Folder.<>c__DisplayClass4.<GetChildren>b__3(Int64 maxNumItems, Int64 skipCount) in D:\Projects\CMIS\DotCMIS\client\client-objects.cs:line 1124
at DotCMIS.Client.Impl.PageFetcher`1.FetchNextPage(Int64 skipCount) in D:\Projects\CMIS\DotCMIS\client\client-utils.cs:line 563
at DotCMIS.Client.Impl.AbstractEnumerator`1.GetCurrentPage() in D:\Projects\CMIS\DotCMIS\client\client-utils.cs:line 528
at DotCMIS.Client.Impl.CollectionEnumerator`1.MoveNext() in D:\Projects\CMIS\DotCMIS\client\client-utils.cs:line 608
at ConsoleTest.Module1.Demo(ENDPOINT_TYPE endpoint_type) in D:\Projects\CMIS\ConsoleTest\Module1.vb:line 399
通过 AtomPub 端点(文件夹 /.../002) 注意:通过 WS 也不例外。?
DotCMIS.Exceptions.CmisRuntimeException: Unauthorized
at DotCMIS.Binding.AtomPub.AbstractAtomPubService.Read(UrlBuilder url) in D:\Projects\CMIS\DotCMIS\binding\atompub\atompub.cs:line 442
at DotCMIS.Binding.AtomPub.NavigationService.GetChildren(String repositoryId, String folderId, String filter, String orderBy, Nullable`1 includeAllowableActions, Nullable`1 includeRelationships, String renditionFilter, Nullable`1 includePathSegment, Nullable`1 maxItems, Nullable`1 skipCount, IExtensionsData extension) in D:\Projects\CMIS\DotCMIS\binding\atompub\atompub.cs:line 1133
at DotCMIS.Client.Impl.Folder.<>c__DisplayClass4.<GetChildren>b__3(Int64 maxNumItems, Int64 skipCount) in D:\Projects\CMIS\DotCMIS\client\client-objects.cs:line 1124
at DotCMIS.Client.Impl.PageFetcher`1.FetchNextPage(Int64 skipCount) in D:\Projects\CMIS\DotCMIS\client\client-utils.cs:line 563
at DotCMIS.Client.Impl.AbstractEnumerator`1.GetCurrentPage() in D:\Projects\CMIS\DotCMIS\client\client-utils.cs:line 528
at DotCMIS.Client.Impl.CollectionEnumerator`1.MoveNext() in D:\Projects\CMIS\DotCMIS\client\client-utils.cs:line 608
at ConsoleTest.Module1.Demo(ENDPOINT_TYPE endpoint_type) in D:\Projects\CMIS\ConsoleTest\Module1.vb:line 399
CMIS Workbench 导航到子文件夹(通过 AtomPub 端点)
Error
connection:
Unexpected document! Received: HTML document
CMIS Workbench 导航到子文件夹(通过 WebService 端点)
Error
runtime:
Cannot complete this action.
Please try again.
2.无法执行cmis:querySelect * From cmis:folder
CMIS 工作台查询(通过 AtomPub 端点)
再次提交查询会给出不同的错误消息
DotCMIS cmis:query(通过 AtomPub 端点)
DotCMIS.Exceptions.CmisRuntimeException: Unauthorized
at DotCMIS.Binding.AtomPub.AbstractAtomPubService.Post(UrlBuilder url, String contentType, Output writer) in D:\Projects\CMIS\DotCMIS\binding\atompub\atompub.cs:line 454
at DotCMIS.Binding.AtomPub.DiscoveryService.Query(String repositoryId, String statement, Nullable`1 searchAllVersions, Nullable`1 includeAllowableActions, Nullable`1 includeRelationships, String renditionFilter, Nullable`1 maxItems, Nullable`1 skipCount, IExtensionsData extension) in D:\Projects\CMIS\DotCMIS\binding\atompub\atompub.cs:line 2629
at DotCMIS.Client.Impl.Session.<>c__DisplayClass7.<Query>b__6(Int64 maxNumItems, Int64 skipCount) in D:\Projects\CMIS\DotCMIS\client\client-impl.cs:line 722
at DotCMIS.Client.Impl.PageFetcher`1.FetchNextPage(Int64 skipCount) in D:\Projects\CMIS\DotCMIS\client\client-utils.cs:line 563
at DotCMIS.Client.Impl.AbstractEnumerator`1.GetCurrentPage() in D:\Projects\CMIS\DotCMIS\client\client-utils.cs:line 528
at DotCMIS.Client.Impl.CollectionEnumerator`1.MoveNext() in D:\Projects\CMIS\DotCMIS\client\client-utils.cs:line 608
at ConsoleTest.Module1.Demo(ENDPOINT_TYPE endpoint_type) in D:\Projects\CMIS\ConsoleTest\Module1.vb:line 545
CMIS 工作台查询(通过 WebService 端点)
DotCMIS cmis:query(通过 WebService 端点)
DotCMIS.Exceptions.CmisConstraintException: Cannot complete this action.
Please try again.
at DotCMIS.Binding.WebServices.DiscoveryService.Query(String repositoryId, String statement, Nullable`1 searchAllVersions, Nullable`1 includeAllowableActions, Nullable`1 includeRelationships, String renditionFilter, Nullable`1 maxItems, Nullable`1 skipCount, IExtensionsData extension) in D:\Projects\CMIS\DotCMIS\binding\webservices\webservices.cs:line 1425
at DotCMIS.Client.Impl.Session.<>c__DisplayClass7.<Query>b__6(Int64 maxNumItems, Int64 skipCount) in D:\Projects\CMIS\DotCMIS\client\client-impl.cs:line 722
at DotCMIS.Client.Impl.PageFetcher`1.FetchNextPage(Int64 skipCount) in D:\Projects\CMIS\DotCMIS\client\client-utils.cs:line 563
at DotCMIS.Client.Impl.AbstractEnumerator`1.GetCurrentPage() in D:\Projects\CMIS\DotCMIS\client\client-utils.cs:line 528
at DotCMIS.Client.Impl.CollectionEnumerator`1.MoveNext() in D:\Projects\CMIS\DotCMIS\client\client-utils.cs:line 608
at ConsoleTest.Module1.Demo(ENDPOINT_TYPE endpoint_type) in D:\Projects\CMIS\ConsoleTest\Module1.vb:line 545
(仅通过 WS 端点)当我限制为 24 个最大命中时查询有效:
经过一些试验和错误,发现某些项目导致错误。
这个查询没问题:
SELECT * FROM cmis:folder WHERE ID < 39 OR ID > 42
但是,这些会导致错误Error runtime: Cannot complete this action. Please try again.
:
SELECT * FROM cmis:folder Where id = 39 (/.../001/001-01)
SELECT * FROM cmis:folder Where id = 40 (/.../001/001-02)
SELECT * FROM cmis:folder Where id = 42 (/.../001/001-02/001-02-01)
如何解决此问题?
我在 SharePoint 中使用相同的用户帐户查看文件夹及其子文件夹没有问题:
我还使用最新的累积更新(2016 年 2 月,3 月)对 SharePoint 进行了修补,该更新通过 AtomPub 端点修复了更改日志的问题,这要感谢 Florian Müller。