Return-Path: X-Original-To: apmail-chemistry-dev-archive@www.apache.org Delivered-To: apmail-chemistry-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8A861C9E4 for ; Fri, 14 Nov 2014 12:30:42 +0000 (UTC) Received: (qmail 13155 invoked by uid 500); 14 Nov 2014 12:30:41 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 13115 invoked by uid 500); 14 Nov 2014 12:30:41 -0000 Mailing-List: contact dev-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list dev@chemistry.apache.org Received: (qmail 13098 invoked by uid 99); 14 Nov 2014 12:30:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Nov 2014 12:30:41 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [80.241.57.33] (HELO plasma4.jpberlin.de) (80.241.57.33) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Nov 2014 12:30:12 +0000 Received: from hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by plasma.jpberlin.de (Postfix) with ESMTPS id C6442AC1B3; Fri, 14 Nov 2014 13:30:11 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from plasma.jpberlin.de ([91.198.250.140]) (using TLS with cipher AES256-SHA) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10024) with ESMTPS id KfxLhkHAGFym; Fri, 14 Nov 2014 13:30:10 +0100 (CET) Received: from webmail.jpberlin.de (sinatra8.heinlein-hosting.de [91.198.250.92]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: fmueller@jpberlin.de) by plasma.jpberlin.de (Postfix) with ESMTPSA id 809B7AC1D0; Fri, 14 Nov 2014 13:30:10 +0100 (CET) Received: from /OYBD3tOANFyuOWJGwWid+Up6/YP/zApHt6cd8Eeruo= (zJKipK4+9KqOhP10whjyTZ6qKos0vkbS) by webmail.jpberlin.de with HTTP (HTTP/1.1 POST); Fri, 14 Nov 2014 13:30:10 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Fri, 14 Nov 2014 13:30:10 +0100 From: =?UTF-8?Q?Florian_M=C3=BCller?= To: Olivier Aye Cc: Dev Subject: RE: cancel Checkout Atom or Web service In-Reply-To: References: <8b4a696c2d5c48c8af7e94108725e67f@AM2PR02MB0337.eurprd02.prod.outlook.com> <54650A18.6030805@apache.org> Message-ID: <2b810b56ac25186deeceb67b32dff345@jpberlin.de> X-Sender: fmui@apache.org User-Agent: RoundCube Webmail X-Virus-Checked: Checked by ClamAV on apache.org So, does sessionAtom.GetObject(id) return a Document object? If so, I don't understand the problem. If not, which C# object does it return? Btw. You should cast to IDocument. Document is an implementation class and GetObject() might return something different in later releases. - Florian > Hello Florian, > > Thank you very much for your quickly reply. > > In fact it's the same object in AtomPub and WebService it's an > DotCMIS.Client.Impl.Document. > > And this document comes from a mongoDD database. > > > { "_id" : { "$oid" : "54648c9e2e1cb080eb95a6f3"} , > "cmis:contentStreamData" : { "$binary" : > "iVBORw0KGgoAAAANSUhEUgAABCoAAAKhCAYAAACW8k/ ..." , "$type" : 0} , > "cmis:contentStreamLength" : "51434" , > "cmis:path" : "null" , > "cmis:objectTypeId" : "cmis:document" , > "cmis:versionSeriesCheckedOutBy" : "olivier" , > "cmis:isPrivateWorkingCopy" : "true" , > "cmis:versionSeriesCheckedOutId" : "54648c9e2e1cb080eb95a6f3" , > "cmis:versionSeriesId" : "54638bb67afe91ef43fdae21" , > "cmis:versionLabel" : "1.1" , "cmis:isLatestVersion" : "false" , > "cmis:isVersionSeriesCheckedOut" : "true" , > "cmis:lastModifiedBy" : "olivier" , > "cmis:createdBy" : "olivier" , > "cmis:isLatestMajorVersion" : "false" , > "cmis:contentStreamId" : "null" , > "cmis:name" : "MyFile.PNG" , > "cmis:contentStreamMimeType" : "image/png" , > "cmis:creationDate" : "13/11/2014 11:49:02" , > "cmis:secondaryObjectTypeIds" : "null" , > "cmis:changeToken" : "" , > "cmis:acl" : { "admin" : "cmis:all" , "olivier" : "cmis:write"} , > "cmis:checkinComment" : "" , > "cmis:isMajorVersion" : "false" , > "cmis:isImmutable" : "false" , > "cmis:baseTypeId" : "cmis:document" , > "cmis:description" : "" , > "cmis:contentStreamFileName" : "MyFile.PNG" , > "cmis:lastModificationDate" : "13/11/2014 11:49:02" , > "cmis:parentId" : "null" , > "cmis:versionSeriesCheckedOutFromId" : "54638bb67afe91ef43fdae21"} > > > Best Regards, > > Olivier Aye > > > -----Original Message----- > From: Florian Müller [mailto:fmui@apache.org] > Sent: jeudi 13 novembre 2014 20:44 > To: dev@chemistry.apache.org > Cc: Olivier Aye > Subject: Re: cancel Checkout Atom or Web service > > Hi Olivier, > > can you tell us what kind of object is returned when you are using > AtomPub? > > > - Florian > > > >> DotCmis V 0.5.0.0 >> OpenCmis 0.11.0 >> MongoDb 2.6 >> >> Hello, >> >> I have an error when I want cast a an object to a document, when this >> object is checkout in my database, and only with an Atom session. >> >> Currently, if I do the same method, but in WebService the method works >> properly. >> >> This method works >> >> public ActionResult CancelCheckOut(String id) >> { >> IDocument od = sessionWS.GetObject(id) as Document; >> od.CancelCheckOut(); >> return RedirectToAction("Index"); >> } >> >> >> This method doesn't works >> >> public ActionResult CancelCheckOut(String id) >> { >> IDocument od = sessionAtom.GetObject(id) as Document; This >> method return an error at this line >> od.CancelCheckOut(); >> return RedirectToAction("Index"); >> } >> >> Do you have an idea how I can resolve this problem. >> >> Thanks >> >> Olivier >> >> >> This email message and any attachments ("the email") are confidential >> and intended only for the recipient(s) indicated. If you are not an >> intended recipient, please be advised that any use, dissemination, >> forwarding or copying of this email whatsoever is prohibited without >> Evolution Energie's prior written consent. If you have received this >> email in error, please delete it without saving a copy and notify the >> sender immediately. Internet emails are not necessarily secured, and >> declines responsibility for any changes that may have been made to >> this email after it was sent. While we take all reasonable precautions >> to ensure that viruses are not transmitted via emails, we recommend >> that you take your own measures to prevent viruses from entering your >> computer system. >> > This email message and any attachments (“the email”) are confidential > and intended only for the recipient(s) indicated. If you are not an > intended recipient, please be advised that any use, dissemination, > forwarding or copying of this email whatsoever is prohibited without > Evolution Energie's prior written consent. If you have received this > email in error, please delete it without saving a copy and notify the > sender immediately. Internet emails are not necessarily secured, and > declines responsibility for any changes that may have been made to > this email after it was sent. While we take all reasonable precautions > to ensure that viruses are not transmitted via emails, we recommend > that you take your own measures to prevent viruses from entering your > computer system.