07-04-2017 04:23 AM
Hi,
I am using Alfresco 5.2 and trying to access CMIS RepositoryService, while getting repositories (from .Net client) I am getting below error.
Error: “MustUnderstand headers: [{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood.”
Tried creating custom binding but could not resolve the error as we don't have control on setting 'mustUnderstand' attribute to 0 (zero), I could see the attribute value set to 1 by default and not finding a way to resolve this issue.
Note: There was no such error on Alfresco 5.1.2.
Please find Alfresco 5.1.2 and 5.2 SOAP requests below:
-----------Alfresco 5.1.2 SOAP RequestTART--------------------------
--uuid:67f0940c-3208-4d12-b7ea-ea0064f90452+id=8
Content-ID: <http://tempuri.org/0>
Content-Transfer-Encoding: 8bit
Content-Type: application/xop+xml;charset=utf-8;type="text/xml"
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<oecurity s:mustUnderstand="1" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2017-07-03T06:48:53.099Z</u:Created>
<u:Expires>2017-07-03T06:53:53.099Z</u:Expires>
</u:Timestamp>
<o:UsernameToken u:Id="uuid-da1000d2-0916-4bb7-8b2a-ebc9162d6aa7-12">
<o:Username>admin</o:Username>
<oassword Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">admin</oassword>
</o:UsernameToken>
</oecurity>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<getRepositories xmlns="http://docs.oasis-open.org/ns/cmis/messaging/200908/">
<extension/>
</getRepositories>
</s:Body>
</s:Envelope>
--uuid:67f0940c-3208-4d12-b7ea-ea0064f90452+id=8
-----------Alfresco 5.1.2 SOAP Request:END--------------------------
----------Alfresco 5.2 SOAP RequestTART---------------------------
--uuid:55c19061-1db8-44a3-b7a2-691063dbcbe6+id=3
Content-ID: <http://tempuri.org/0>
Content-Transfer-Encoding: 8bit
Content-Type: application/xop+xml;charset=utf-8;type="application/soap+xml"
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<a:Action s:mustUnderstand="1">http://tempuri.org/IRepositoryServicePort/getRepositories</a:Action>
<a:MessageID>urn:uuid:ee83ca99-b1e6-4151-acb3-1f1663e57901</a:MessageID>
<a:ReplyTo>
<a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
<a:To s:mustUnderstand="1">https://172.26.39.155:8443/alfresco/cmisws/RepositoryService</a:To>
<oecurity s:mustUnderstand="1" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2017-06-29T13:29:59.879Z</u:Created>
<u:Expires>2017-06-29T13:34:59.879Z</u:Expires>
</u:Timestamp>
<o:UsernameToken u:Id="uuid-53f99b38-2270-44a8-93a5-4b2e1459cd32-3">
<o:Username>admin</o:Username>
<oassword Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">Password</oassword>
</o:UsernameToken>
</oecurity>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<getRepositories xmlns="http://docs.oasis-open.org/ns/cmis/messaging/200908/">
<extension/>
</getRepositories>
</s:Body>
</s:Envelope>
--uuid:55c19061-1db8-44a3-b7a2-691063dbcbe6+id=3--
----------Alfresco 5.2 SOAP Request:END---------------------------
Please let me know whether there is a known bug in Alfresco 5.2 regarding the same?
Also suggest any solution to get it working with Alfresco 5.2.
Regards
Srinivas
07-04-2017 06:30 PM
I think nobody in this community is crafting their CMIS SOAP requests by hand, so most (including myself) will not be that familiar with the message body layout. Typically you'd use an established CMIS client library (like OpenCMIS) to do all of the binding handling for you - and I do believe there is a .NET variant of OpenCMIS that you could use.
There are apparently no known issues with regards to Alfresco 5.2 and CMIS SOAP endpoint - you can check for yourself in the Alfresco JIRA.
07-05-2017 03:31 AM
To be clear, I am not crafting any SOAP request, I posted the SOAP request for reference to figure out any issues.
My question is:
I tried sending same request from our custom DotNet client which is working fine with Alfresco 5.1.2 but getting error from 5.2.
Error: “MustUnderstand headers: [{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood.”
Something has changed in Alfresco 5.2 compared to 5.1.2 that is treating the request differently and causing the error, please suggest any solution to resolve the issue.
07-05-2017 03:38 AM
One notable change from 5.1 to 5.2 is the upgrade of server-side OpenCMIS library (from 0.11.0 to 1.0.0). See [REPO-1238] Upgrade OpenCMIS to 1.0.0 - Alfresco JIRA
I scanned the release notes for 0.12.0, 0.13.0, 0.14.0 & 1.0.0 but did not notice anything relevant.
So instead I searched the Apache Chemistry JIRA project and found the following marked as "Won't Fix" (against 0.12.0 and higher):
Regards,
Jan
07-05-2017 02:32 PM
Jan,
Thanks for the details on the JIRA issue marked as "Won't Fix" !
I tried using PortCMIS libraries for connecting to Alfresco 5.2 and that worked but for our application we cannot use PortCMIS as it is not approved for now.
I am looking for a solution where we can set MustUnderstand attribute to 0(zero) and get it working as the problem is on the server not accepting the same request that was working for Alfresco 5.1.2, there is no issue in our/client code but Alfresco 5.2 changed to use CMIS 1.1 causing unexpected error.
Is there a way that we can set MustUnderstand attribute to zero so that it will work without error?
Please suggest.
Thanks in advance,
Srinivas
07-06-2017 11:23 AM
Hi Jan,
I am using Alfresco-one 5.2 Trial version, please let me know how and from
where I can raise a support ticket.
Not sure what do you mean by Community version? Please clarify.
Regards
Srinivas Velidanda
07-06-2017 08:11 AM
Hi,
Have you try to use Rest connection ?
with openCmis, it works better. Otherwise, you can try Soap connection with https endpoint.
Best Regards
Explore our Alfresco products with the links below. Use labels to filter content by product module.