Hi folks
I've been accessing the Dctm CMIS implementation using the Chemistry OpenCMIS Java APIs and I've noticed something weird with CO/CI, I'm wondering if anybody can help or has encountered similar.
I check out an object using the following code :
Document doc = ((Document)session.getObject(session.createObjectId("090000018004ec68")));
String pwcId = doc.checkOut().getId();
If the document is the latest version of a series (e.g. there exists versions 1.0, 1.1, 1.2 and 1.3), the above calls result in ALL versions being checked out and no indication of an error. The id specified in the call is the id of the latest version, I'm not specifying the chronicle id or an id of any of the previous versions. This only happens when I access the Dctm CMIS implementation via OpenCMIS. If I check out the same document via the WS interface the behaviour is as expected. So, I'm wondering if this is a bug in either OpenCMIS or the Atom binding interface of Dctm CMIS. I've TCP Monitored the exchange between the chemistry api on the call and the dctm cmis implementation and I can't see anything wrong with it :
POST /dctm-cmis/resources/repositories/wk_dev/checkedout HTTP/1.1
Content-Type: application/atom+xml;type=entry
Authorization: Basic ZG1hZG1pbjpkZW1vLmRlbW8=
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.6.0_20
Host: 127.0.0.1:8081
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 613
<?xml version='1.0' encoding='UTF-8'?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"
xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/">
<atom:id>urn:uuid:00000000-0000-0000-0000-00000000000</atom:id>
<atom:title></atom:title>
<atom:updated>2011-03-05T04:40:22Z</atom:updated>
<cmisra:object xmlns:ns3="http://docs.oasis-open.org/ns/cmis/messaging/200908/">
<cmis:properties>
<cmis:propertyId propertyDefinitionId="cmis:objectId">
<cmis:value>090000018004ec68</cmis:value>
</cmis:propertyId>
</cmis:properties>
</cmisra:object>
</atom:entry>
I've also run the same code against an Alfresco CMIS implementation and there are no issues.
If the id specified is for a document which is at version 1.0, the check out is as expected. However, when I attempt to check the document back in using code as follows :
Document doc = ((Document)session.getObject(session.createObjectId("090000018004ec68")));
ObjectId newId = doc.checkIn(false, null, cmisStream, "a minor version", null, null, null);
The checkin call does not fail, but the newId returned is the same as the id specified to get the document and when I check to see if the document has actually been checked in via DA, then it turns out not to have been. I've switched logging on in the tomcat I'm using to host the Dctm CMIS implementation and I can't see anything obvious beeing outputted and again I've monitored the call using TCPMon and can't see anything amiss:
PUT /dctm-cmis/resources/repositories/wk_dev/objects/090000018004ec68?checkinComment=a+minor+version&major=false&checkin=true HTTP/1.1
Content-Type: application/atom+xml;type=entry
Authorization: Basic ZG1hZG1pbjpkZW1vLmRlbW8=
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.6.0_20
Host: 127.0.0.1:8081
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-Length: 1081
<?xml version='1.0' encoding='UTF-8'?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"
xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/">
<atom:id>urn:uuid:00000000-0000-0000-0000-00000000000</atom:id>
<atom:title></atom:title>
<atom:updated>2011-03-05T05:18:37Z</atom:updated>
<cmisra:content>
<cmisra:mediatype>text/xml</cmisra:mediatype>
<cmisra:base64>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPFJlcG9ydCBSZXBvcnRSYW5n
ZT0iV0VFS0xZIiBSZXBvcnRUeXBlPSJIU19QT0xJQ1kiPgogICAgPERvY3VtZW50PgogICAgICAg
IDxEYXRlPjEzLzAxLzIwMTE8L0RhdGU+CiAgICAgICAgPE5hbWU+SFMgUG9saWN5IDEueG1sPC9O
YW1lPgogICAgICAgIDxSZWFzb25fZm9yX0NoYW5nZT50ZXN0IG5ldyB3b3JrZmxvdyBmb3IgZ2Vu
ZXJhdGluZyBQREYgcmVuZGl0aW9uczwvUmVhc29uX2Zvcl9DaGFuZ2U+CiAgICA8L0RvY3VtZW50
PgoJPERvY3VtZW50PnR3aXQgdHdvbywgdHdpdCB0d29vPC9Eb2N1bWVudD4KPC9SZXBvcnQ+
</cmisra:base64>
</cmisra:content>
<cmisra:object xmlns:ns3="http://docs.oasis-open.org/ns/cmis/messaging/200908/">
<cmis:properties />
</cmisra:object>
</atom:entry>
Any help, thoughts or pointing out glaring errors I've made would be much appreciated.
Cheers
Merv