You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by jp...@apache.org on 2013/08/13 03:50:24 UTC

svn commit: r1513315 - /chemistry/cmislib/trunk/src/cmislib/atompub_binding.py

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():