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 56F8B18F63 for ; Fri, 4 Dec 2015 22:30:46 +0000 (UTC) Received: (qmail 14306 invoked by uid 500); 4 Dec 2015 22:30:46 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 14249 invoked by uid 500); 4 Dec 2015 22:30:46 -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 14237 invoked by uid 99); 4 Dec 2015 22:30:46 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2015 22:30:46 +0000 Received: from [192.168.178.23] (unknown [95.91.202.189]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 7B91E1A0149; Fri, 4 Dec 2015 22:30:45 +0000 (UTC) Subject: Re: Unable to update a custom integer property in DotCMIS To: dev@chemistry.apache.org, paulsm1021@yahoo.com References: <758051800.1145136.1449259876404.JavaMail.yahoo.ref@mail.yahoo.com> <758051800.1145136.1449259876404.JavaMail.yahoo@mail.yahoo.com> From: =?UTF-8?Q?Florian_M=c3=bcller?= Message-ID: <56621412.5040900@apache.org> Date: Fri, 4 Dec 2015 23:30:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <758051800.1145136.1449259876404.JavaMail.yahoo@mail.yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi Paul, Please you try setting a long instead of an int: cmisProperties.Add(propName, 12345L) The DotCMIS is not very tolerant. Something that should be changed... - Florian > I have a DotCMIS 0.7 app talking to a FileNet P8 5.2 repository. I'm able to read and write most custom properties (String, Float, DateTime, etc.) ... but not "Integer". > I can *read* the custom integer property ("RGBInteger"), but when I try to update it (to an existing document), or add it (to a new document), it's always set to "null" in the repository. > SAMPLE CODE: Public Sub TestIntegerProp(ByVal docName As String, ByVal propName As String) > > ' Perform query > Dim strSQL = "select * from RGBClass2 where cmis:name like '" & docName & "%'" > Dim queryResults As IItemEnumerable(Of IQueryResult) = m_Session.Query(strSQL, False) > > ' Fetch document > Dim qr As IQueryResult = queryResults(0) > <= POST /fncmis/resources/RGBOS/Query HTTP/1.1 > Dim docId As String = qr.GetPropertyValueByQueryName("cmis:objectId").ToString() > Dim cmisDoc As IDocument = m_Session.GetObject(docId) > <= GET /fncmis/resources/RGBOS/Content/idd_4EA639AB-5973-4750-ABC2-B2742AFCDFEB?filter=&includeAllowableActions=true&includeACL=false HTTP/1.1 > GET /fncmis/resources/RGBOS/Type/RGBClass2 HTTP/1.1 > > ' Read property > Dim cmisProp As IProperty = FindProperty(propName, cmisDoc.Properties) > <= OK: the property is "100" > > ' Update property > Dim cmisProperties As IDictionary(Of String, Object) = New Dictionary(Of String, Object) > cmisProperties.Add(propName, 12345) > > ' Update document > Dim cmisObj As IObjectId = cmisDoc.UpdateProperties(cmisProperties) > <= PUT /fncmis/resources/RGBOS/Content/idd_4EA639AB-5973-4750-ABC2-B2742AFCDFEB?changeToken=9 HTTP/1.1 > GET /fncmis/resources/RGBOS/Content/idd_4EA639AB-5973-4750-ABC2-B2742AFCDFEB?filter=&includeAllowableActions=true&includeACL=false HTTP/1.1 > <= No error: but this sets the property to "Nothing" (???) > > This is the XML when I query the document: RGBInteger => > ... > > 100 > > <= READ - GOOD! See correct value of "100" > But this is the XML when I try to update the document: > RGBInteger => > ... > > > The problem occurs for *all* integer custom properties I try to update: either single-valued (like above) or multi-valued. > The problem seems similar to this post: > https://forums.alfresco.com/forum/developer-discussions/alfresco-api/dotcmis-custom-type-property-fails-integers-08202014-2009 > <= Unfortunately, no resolution... > Q: Any suggestions what might be going wrong? > Thank you in advance > > > >