You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Jeff Potts (JIRA)" <ji...@apache.org> on 2013/12/13 23:10:09 UTC

[jira] [Commented] (CMIS-743) Cannot checkout a document

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

Jeff Potts commented on CMIS-743:
---------------------------------

I am having a hard time re-creating this issue against 4.2.d using the same service URL you are using. Can you follow these steps and see if you get similar results?

from cmislib.model import CmisClient

>>> client = CmisClient('http://localhost:8080/alfresco/cmisatom', 'admin', 'admin')
>>> repo = client.defaultRepository
>>> root = repo.rootFolder
>>> root.name
u'Company Home'
>>> repo.info['productVersion']
u'4.2.0 (r54676-b4795)'
>>> doc = root.createDocument('foodoc')
>>> doc.name
u'foodoc'
>>> doc.id
'workspace://SpacesStore/f02f76ce-e87e-4b5c-95e9-5a3a7ce97cc4;1.0'
>>> pwc = doc.checkout()
>>> doc.isCheckedOut()
True
>>> doc = pwc.checkin()
>>> doc.isCheckedOut()
False
>>> doc = repo.getObjectByPath('/foodoc')
>>> pwc = doc.checkout()
>>> doc = pwc.checkin()
>>> doc.isCheckedOut()
False
>>> doc.properties['cmis:versionLabel']
u'3.0'

> Cannot checkout a document
> --------------------------
>
>                 Key: CMIS-743
>                 URL: https://issues.apache.org/jira/browse/CMIS-743
>             Project: Chemistry
>          Issue Type: Bug
>          Components: python-cmislib
>    Affects Versions: cmislib 0.5.1
>         Environment: Python 2.7.6
> Alfresco 4.2.d on Ubuntu Linux Server 12.04
> Client running cmislib Ubuntu Linux Desktop 12.04
>            Reporter: Roberto Rossi
>            Assignee: Jeff Potts
>              Labels: checkout, python
>
> Using cmislib I cannot checkout any documents (both simple and versionable). Here the code I'm using:
> obj = self._repo.getObject(objectId)
> pwc = obj.checkout()
> in the model.py file I'm receiving this error:
> HTTPError: HTTP Error 400: Bad Request
> and then:
> InvalidArgumentException: Error 400 at http://teamtest:8080/alfresco/cmisatom/000fb4b4-d4b6-4ef7-a049-67939b9d70c8/checkedout
> during:
> result = self._cmisClient.post(checkoutUrl.encode('utf-8'),
>                                        entryXmlDoc.toxml(encoding='utf-8'),
>                                        ATOM_XML_ENTRY_TYPE)
> I verified that canCheckOut is in the allowable actions for the document.
> I also verified that the obj can be fetch correctly from the repository.
> Something I'm doing wrong?
> Thank in advance for your support.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)