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 513B79DAA for ; Sat, 31 Mar 2012 20:04:54 +0000 (UTC) Received: (qmail 23577 invoked by uid 500); 31 Mar 2012 20:04:54 -0000 Delivered-To: apmail-chemistry-dev-archive@chemistry.apache.org Received: (qmail 23531 invoked by uid 500); 31 Mar 2012 20:04:54 -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 23523 invoked by uid 99); 31 Mar 2012 20:04:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Mar 2012 20:04:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Mar 2012 20:04:52 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DA1DB350180 for ; Sat, 31 Mar 2012 20:04:32 +0000 (UTC) Date: Sat, 31 Mar 2012 20:04:32 +0000 (UTC) From: =?utf-8?Q?Florian_M=C3=BCller_=28Commented=29_=28JIRA=29?= To: dev@chemistry.apache.org Message-ID: <140635051.1543.1333224272894.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <925327626.33441.1333039825613.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CMIS-518) Interoperability issues with deserialization of attributes in Extension Elements MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CMIS-518?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D132432= 70#comment-13243270 ]=20 Florian M=C3=BCller commented on CMIS-518: ------------------------------------- First of all, the two examples are not equivalent. Default namespaces work = differently for attributes [1]. But that's not the problem. The problem is that Xalan isn't namespace aware= by default but JAXB requires a namespace aware parser. This is not an OpenCMIS bug but an incompatibility.=20 The easiest way to fix that is to set the system property "javax.xml.transf= orm.TransformerFactory" to a different transformer factory class name. This not an ideal solution because it may affect other code running in the = JVM. I'll try to find a workaround. [1] http://www.w3.org/TR/REC-xml-names/#defaulting =20 > Interoperability issues with deserialization of attributes in Extension E= lements > -------------------------------------------------------------------------= ------- > > Key: CMIS-518 > URL: https://issues.apache.org/jira/browse/CMIS-518 > Project: Chemistry > Issue Type: Bug > Components: opencmis-commons > Affects Versions: OpenCMIS 0.7.0 > Reporter: David Ward > Assignee: Florian M=C3=BCller > Priority: Critical > Attachments: ALF13088.diff > > > We came across this issue in https://issues.alfresco.com/jira/browse/ALF-= 13088 . This is affecting Alfresco OpenCMIS Extensions. > It would seem that the presence or absence of xalan.jar on the sending si= de can affect the receiver's ability to lookup attributes on an extension e= lement. > The two examples given at > http://groups.google.com/group/alfresco-opencmis-extension/browse_thread/= thread/f9d9152691e5a04f > are equivalent. They just use different ways of serializing the same name= spaced XML. > I think the problem lies in the way that OpenCMIS deserializes extension = elements. It strips the namespace from all attributes, loading their local = name into a single map. That means xmlns:propertyDefinitionId and propertyD= efinitionId:propertyDefinitionId may be considered to be the same attribute= so one can overwrite the other. > The attached patch to org.apache.chemistry.opencmis.commons.impl.Converte= r.convertDomToCmisExtensionElement() fixed the issue for us, making it only= pay attention to attributes in the element's namespace. What do you think? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira