# Path: webui/server/tornadows/xmltypes.py
# def createElementXML(name,type,prefix='xsd'):
# def createArrayXML(name,type,prefix='xsd',maxoccurs=None):
# 	def __init__(self,type,maxOccurs=None):
# 	def createArray(self,name):
# 	def createType(self,name):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# class Array:
# class PrimitiveType:
# class Integer(PrimitiveType):
# class Decimal(PrimitiveType):
# class Double(PrimitiveType):
# class Float(PrimitiveType):
# class Duration(PrimitiveType):
# class Date(PrimitiveType):
# class Time(PrimitiveType):
# class DateTime(PrimitiveType):
# class String(PrimitiveType):
# class Boolean(PrimitiveType):
# 
# Path: webui/server/tornadows/complextypes.py
# class Property:
# class IntegerProperty(Property):
# class DecimalProperty(Property):
# class DoubleProperty(Property):
# class FloatProperty(Property):
# class DurationProperty(Property):
# class DateProperty(Property):
# class TimeProperty(Property):
# class DateTimeProperty(Property):
# class StringProperty(Property):
# class BooleanProperty(Property):
# class ArrayProperty(list):
# class ComplexType(object):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self, object, minOccurs = 1, maxOccurs=None, data=[]):
# 	def toXSD(self,namespace='xsd',nameelement=None):
# 	def __init__(self):
# 	def toXML(self,name=None,method=''):
# 	def toXSD(cls,xmlns='http://www.w3.org/2001/XMLSchema',namespace='xsd',method='', ltype=[]):
# 	def _generateXSD(cls,xmlns='http://www.w3.org/2001/XMLSchema',namespace='xsd', ltype=[]):
# 	def getName(cls):
# 	def _createAttributeType(self,element):
# def xml2object(xml,xsd,complex,method=''):
# def cls2dict(complex):
# def xsd2dict(xsd,namespace='xsd'):
# def xml2list(xmldoc,name,types,method=''):
# def generateOBJ(d,namecls,types):
# def createProperty(typ,value):
# def genattr(elems):
# def findElementFromDict(dictionary,key):
# def convert(typeelement,value):
# def createPythonType2XMLType(pyType):


import xml.dom.minidom
import inspect
from webui.server.tornadows import xmltypes
from webui.server.tornadows import complextypes
	"""
	def __init__(self,nameservice=None,targetNamespace=None,methods=None,location=None):
		self._nameservice = nameservice
		self._namespace = targetNamespace
		self._methods   = methods
		self._location = location

	def createWsdl(self):
		""" Method that allows create the wsdl file """
		typeInput  = None
		typeOutput = None
		types  = '<wsdl:types>\n'
		types += '<xsd:schema targetNamespace="%s">\n'%self._namespace

		namespace = 'xsd'
		types_list = []
		ltype = []
		for wsdl_data in self._methods:
			self._arguments = wsdl_data['args']
			self._elementNameInput = wsdl_data['input'][0]
			self._elementInput = wsdl_data['input'][1]
			self._elementNameOutput = wsdl_data['output'][0]
			self._elementOutput = wsdl_data['output'][1]
			self._operation = wsdl_data['operation']

			method = self._operation

			if len(self._methods) == 1:
				method = ''


# Path: webui/server/tornadows/xmltypes.py
# def createElementXML(name,type,prefix='xsd'):
# def createArrayXML(name,type,prefix='xsd',maxoccurs=None):
# 	def __init__(self,type,maxOccurs=None):
# 	def createArray(self,name):
# 	def createType(self,name):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# 	def createElement(name,prefix='xsd'):
# 	def getType(self):
# 	def genType(self,v):
# class Array:
# class PrimitiveType:
# class Integer(PrimitiveType):
# class Decimal(PrimitiveType):
# class Double(PrimitiveType):
# class Float(PrimitiveType):
# class Duration(PrimitiveType):
# class Date(PrimitiveType):
# class Time(PrimitiveType):
# class DateTime(PrimitiveType):
# class String(PrimitiveType):
# class Boolean(PrimitiveType):
# 
# Path: webui/server/tornadows/complextypes.py
# class Property:
# class IntegerProperty(Property):
# class DecimalProperty(Property):
# class DoubleProperty(Property):
# class FloatProperty(Property):
# class DurationProperty(Property):
# class DateProperty(Property):
# class TimeProperty(Property):
# class DateTimeProperty(Property):
# class StringProperty(Property):
# class BooleanProperty(Property):
# class ArrayProperty(list):
# class ComplexType(object):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self):
# 	def __init__(self, object, minOccurs = 1, maxOccurs=None, data=[]):
# 	def toXSD(self,namespace='xsd',nameelement=None):
# 	def __init__(self):
# 	def toXML(self,name=None,method=''):
# 	def toXSD(cls,xmlns='http://www.w3.org/2001/XMLSchema',namespace='xsd',method='', ltype=[]):
# 	def _generateXSD(cls,xmlns='http://www.w3.org/2001/XMLSchema',namespace='xsd', ltype=[]):
# 	def getName(cls):
# 	def _createAttributeType(self,element):
# def xml2object(xml,xsd,complex,method=''):
# def cls2dict(complex):
# def xsd2dict(xsd,namespace='xsd'):
# def xml2list(xmldoc,name,types,method=''):
# def generateOBJ(d,namecls,types):
# def createProperty(typ,value):
# def genattr(elems):
# def findElementFromDict(dictionary,key):
# def convert(typeelement,value):
# def createPythonType2XMLType(pyType):


# Path: webui/server/tornadows/wsdl.py
import xml.dom.minidom
import inspect
from webui.server.tornadows import xmltypes
from webui.server.tornadows import complextypes

	"""
	def __init__(self,nameservice=None,targetNamespace=None,methods=None,location=None):
		self._nameservice = nameservice
		self._namespace = targetNamespace
		self._methods   = methods
		self._location = location

	def createWsdl(self):
		""" Method that allows create the wsdl file """
		typeInput  = None
		typeOutput = None
		types  = '<wsdl:types>\n'
		types += '<xsd:schema targetNamespace="%s">\n'%self._namespace

		namespace = 'xsd'
		types_list = []
		ltype = []
		for wsdl_data in self._methods:
			self._arguments = wsdl_data['args']
			self._elementNameInput = wsdl_data['input'][0]
			self._elementInput = wsdl_data['input'][1]
			self._elementNameOutput = wsdl_data['output'][0]
			self._elementOutput = wsdl_data['output'][1]
			self._operation = wsdl_data['operation']

			method = self._operation

			if len(self._methods) == 1:
				method = ''


			if inspect.isclass(self._elementInput) and issubclass(self._elementInput,complextypes.ComplexType): 