Esempio n. 1
0
class ASCommandResponse:
    def __init__(self, response):
        self.wbxmlBody = response
        try:
            if (len(response) > 0):
                self.xmlString = self.decodeWBXML(self.wbxmlBody)
            else:
                raise ValueError("Empty WBXML body passed")
        except Exception as e:
            self.xmlString = None
            raise ValueError("Error: {0}".format(e.message))

    def getWBXMLBytes(self):
        return self.wbxmlBytes

    def getXMLString(self):
        return self.xmlString

    def decodeWBXML(self, body):
        self.instance = ASWBXML()
        self.instance.loadBytes(body)
        return self.instance.getXml()
class ASCommandResponse:

	def __init__(self, response):
		self.wbxmlBody = response
		try:
			if ( len(response) > 0):
				self.xmlString = self.decodeWBXML(self.wbxmlBody)
			else:
				raise ValueError("Empty WBXML body passed")
		except Exception as e:
			self.xmlString = None
			raise ValueError("Error: {0}".format(e.message))

	def getWBXMLBytes(self):
		return self.wbxmlBytes
	
	def getXMLString(self):
		return self.xmlString
	
	def decodeWBXML(self, body):
		self.instance = ASWBXML()
		self.instance.loadBytes(body)
		return self.instance.getXml()
Esempio n. 3
0
 def decodeWBXML(self, body):
     self.instance = ASWBXML()
     self.instance.loadBytes(body)
     return self.instance.getXml()
	def decodeWBXML(self, body):
		self.instance = ASWBXML()
		self.instance.loadBytes(body)
		return self.instance.getXml()