chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpo...@apache.org
Subject svn commit: r1513315 - /chemistry/cmislib/trunk/src/cmislib/atompub_binding.py
Date Tue, 13 Aug 2013 01:50:24 GMT
Author: jpotts
Date: Tue Aug 13 01:50:24 2013
New Revision: 1513315

URL: http://svn.apache.org/r1513315
Log:
cmislib fix for CMIS-703 which is to remove the CDATA from the cmis:statement that gets posted
by a query

Modified:
    chemistry/cmislib/trunk/src/cmislib/atompub_binding.py

Modified: chemistry/cmislib/trunk/src/cmislib/atompub_binding.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/src/cmislib/atompub_binding.py?rev=1513315&r1=1513314&r2=1513315&view=diff
==============================================================================
--- chemistry/cmislib/trunk/src/cmislib/atompub_binding.py (original)
+++ chemistry/cmislib/trunk/src/cmislib/atompub_binding.py Tue Aug 13 01:50:24 2013
@@ -1593,6 +1593,11 @@ class AtomPubRepository(object):
         # build the CMIS query XML that we're going to POST
         xmlDoc = self._getQueryXmlDoc(statement, **kwargs)
 
+        # debug
+        f = open('/var/tmp/query.xml', 'w')
+        f.write(xmlDoc.toxml(encoding='utf-8'))
+        f.close()
+
         # do the POST
         #print 'posting:%s' % xmlDoc.toxml(encoding='utf-8')
         result = self._cmisClient.binding.post(queryUrl.encode('utf-8'),
@@ -1944,8 +1949,11 @@ class AtomPubRepository(object):
         cmisXmlDoc.appendChild(queryElement)
 
         statementElement = cmisXmlDoc.createElementNS(CMIS_NS, "statement")
-        cdataSection = cmisXmlDoc.createCDATASection(query)
-        statementElement.appendChild(cdataSection)
+        #CMIS-703
+        #cdataSection = cmisXmlDoc.createCDATASection(query)
+        #statementElement.appendChild(cdataSection)
+        textNode = cmisXmlDoc.createTextNode(query)
+        statementElement.appendChild(textNode)
         queryElement.appendChild(statementElement)
 
         for (k, v) in kwargs.items():



Mime
View raw message