Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am caustin on github.
  • I am caustin (https://keybase.io/caustin) on keybase.
  • I have a public key ASCdppsJRwwI_KmClBS1vLo_TlzXPs2uIs2BDM6JiOeRmwo

To claim this, I am signing this object:

@caustin
caustin / xsdgen.py
Created October 21, 2010 15:08
proposed initial method of generating per model xsd in soaplib
# This method is a instance method inside the _base.Application class.
def get_xsd(self, model, pretty_print=False):
schema_entries = _SchemaEntries(self)
model.add_to_schema(schema_entries)
nodes = self.__build_schema_nodes(schema_entries, types=None)
return etree.tostring(nodes[nodes.keys()[0]], pretty_print=pretty_print)
b = etree.Element('test')
Boolean.to_xml(False, ns_test, b)
b = b[0]
self.assertEquals('xs:boolean', b.get('{%s}type' % soaplib.ns_xsi))