import time
import pdb
import xml.dom.minidom
-#import xml.dom.ext
import apistub
import inspect
from sfa.storage.parameter import Parameter, Mixed
+from sfa.util.py23 import StringType
+
plc_ns="http://www.planet-lab.org/sfa"
class SoapError(Exception):
return "xsd:boolean"
elif arg_type == FloatType:
return "xsd:double"
- elif arg_type in StringTypes:
+ elif issubclass(arg_type, StringType):
return "xsd:string"
else:
pdb.set_trace()
- raise SoapError, "Cannot handle %s objects" % arg_type
+ raise SoapError("Cannot handle %s objects" % arg_type)
def param_type(self, arg):
return (self.name_complex_type(arg))
in_el.setAttribute("name", method + "_in")
for service_name in function.interfaces:
- if (self.services.has_key(service_name)):
+ if (service_name in self.services):
if (not method in self.services[service_name]):
self.services[service_name].append(method)
else:
def pretty_print(self):
if (self.wsdl):
- #xml.dom.ext.PrettyPrint(self.wsdl)
- xml.dom.minidom.Document.toprettyxml(self.wsdl)
+ print xml.dom.minidom.Document.toprettyxml(self.wsdl)
else:
- raise Exception("Empty WSDL")
+ raise Exception("Empty WSDL")
def main():
parser = OptionParser()