[Erp5-report] r28227 - /erp5/trunk/products/ERP5SyncML/SubscriptionSynchronization.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jul 30 14:28:34 CEST 2009
Author: daniele
Date: Thu Jul 30 14:28:31 2009
New Revision: 28227
URL: http://svn.erp5.org?rev=28227&view=rev
Log:
update default namespace
Modified:
erp5/trunk/products/ERP5SyncML/SubscriptionSynchronization.py
Modified: erp5/trunk/products/ERP5SyncML/SubscriptionSynchronization.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5SyncML/SubscriptionSynchronization.py?rev=28227&r1=28226&r2=28227&view=diff
==============================================================================
--- erp5/trunk/products/ERP5SyncML/SubscriptionSynchronization.py [utf8] (original)
+++ erp5/trunk/products/ERP5SyncML/SubscriptionSynchronization.py [utf8] Thu Jul 30 14:28:31 2009
@@ -27,7 +27,8 @@
##############################################################################
import smtplib # to send emails
-from Subscription import Subscription,Signature
+from Subscription import Subscription
+from Signature import Signature
from XMLSyncUtils import XMLSyncUtils
import commands
from Conduit.ERP5Conduit import ERP5Conduit
@@ -53,7 +54,9 @@
subscription.setZopeUser(user)
subscription.setAuthenticated(True)
- xml = Element('SyncML')
+ #create element 'SyncML' with a default namespace
+ nsmap = {None : self.XHTML_NAMESPACE}
+ xml = Element('SyncML',nsmap=nsmap)
# syncml header
xml.append(self.SyncMLHeader(subscription.incrementSessionId(),
subscription.incrementMessageId(), subscription.getPublicationUrl(),
@@ -92,7 +95,9 @@
This method send crendentials
"""
cmd_id = 1 # specifies a SyncML message-unique command identifier
- xml = Element('SyncML')
+ #create element 'SyncML' with a default namespace
+ nsmap = {None : self.XHTML_NAMESPACE}
+ xml = Element('SyncML',nsmap=nsmap)
# syncml header
data = "%s:%s" % (subscription.getLogin(), subscription.getPassword())
data = subscription.encode(subscription.getAuthenticationFormat(), data)
More information about the Erp5-report
mailing list