[ 
https://issues.apache.org/jira/browse/CMIS-951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14934895#comment-14934895
 ] 

Jennifer Deigendesch commented on CMIS-951:
-------------------------------------------

I wanted to test it against the InMemory repository, but it doesn't support 
policies (see 
http://chemistry.apache.org/java/developing/repositories/dev-repositories-inmemory.html).

So I debugged the code again and the problem I found was that the client wants 
to get information out of a dictionary with the following set of keys:
{"default","<PolicyID>","http://docs.oasis-open.org/ns/cmis/link/200908/policies","application/atom+xml;type=feed"}
After this an exception is triggered: Operation not supported by the repository 
for this object

When I researched how the information was filled into this dictionary I found 
out that this information is gained from the server by using a Read(url) over 
the following URL:
https://<serveradress>/cmis/atom11/default/id?id=<PolicyID>&filter=&includeAllowableActions=&includeACL=&includePolicyIds=&includeRelationships=&renditionFilter=

Hereby I get back a set containing different information but the information 
rel="http://docs.oasis-open.org/ns/cmis/link/200908/policies"; is missing.

This means the exception is either triggered by not getting the correct set of 
information from the server which leads to an incomplete entry in the 
dictionary or from searching with the wrong set of keys in the dictionary.

It would be helpful to know if an object of the policy type can return an 
information with rel="http://docs.oasis-open.org/ns/cmis/link/200908/policies";.

> Problem with applying policy
> ----------------------------
>
>                 Key: CMIS-951
>                 URL: https://issues.apache.org/jira/browse/CMIS-951
>             Project: Chemistry
>          Issue Type: Bug
>          Components: dotcmis
>    Affects Versions: DotCMIS 0.7
>         Environment: AtomPub
> CMIS for .NET
> C#
>            Reporter: Jennifer Deigendesch
>            Assignee: Florian Müller
>         Attachments: 00054-request (object).log, 00054-response (object).log, 
> 00058-request (policy).log, 00058-response (policy).log, 
> AnswerMailinglist.msg, object.xml, policy.xml
>
>
> Hi altogether,
> I’m using DotCMIS 0.7 for .NET via AtomPub and I have a problem with applying 
> a policy to a document.
> First I already fixed the bug in PolicyService in method “ApplyPolicy” to 
> load the link for the given policyId and not for the objectId. But I’ll get 
> the exception “Operation not supported by the repository for this object”...
> I also find out, that the link relation of policies is not available in the 
> binding cache. Instead the link relation of allowable actions is available..
> I already tried to create and apply a policy via the CMIS Workbench (where 
> the bug in method "AppylPolicy" is already fixed) and it works.
> I've already written a mail to the mailing list. The answer is attached as 
> well as the logs of the traffic between client and server (and the XML files 
> of the created object and policy). There you can see that the server sends 
> the policy link.
> I'm really happy to get help soon :)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to