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 D1785F67D for ; Thu, 13 Nov 2014 19:44:32 +0000 (UTC) Received: (qmail 18501 invoked by uid 500); 13 Nov 2014 19:44:32 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 18446 invoked by uid 500); 13 Nov 2014 19:44:32 -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 18434 invoked by uid 99); 13 Nov 2014 19:44:32 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Nov 2014 19:44:32 +0000 Received: from laptop-2.fritz.box (unknown [88.134.141.114]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 2EA841A01AD; Thu, 13 Nov 2014 19:43:32 +0000 (UTC) Message-ID: <54650A18.6030805@apache.org> Date: Thu, 13 Nov 2014 20:44:24 +0100 From: =?ISO-8859-1?Q?Florian_M=FCller?= User-Agent: Postbox 3.0.11 (Macintosh/20140602) MIME-Version: 1.0 To: dev@chemistry.apache.org CC: olivier.aye@evolutionenergie.com Subject: Re: cancel Checkout Atom or Web service References: <8b4a696c2d5c48c8af7e94108725e67f@AM2PR02MB0337.eurprd02.prod.outlook.com> In-Reply-To: <8b4a696c2d5c48c8af7e94108725e67f@AM2PR02MB0337.eurprd02.prod.outlook.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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. >