home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyo (Python 2.5)
-
- from __future__ import with_statement
- from StringIO import StringIO
- from util import Storage
- import os
- import os.path as path
- from import generate
- WSDL_PATH = './src/msn/SOAP/WSTrust/WS-Trust.wsdl'
- _nsdict = {
- 'http://schemas.xmlsoap.org/ws/2005/02/trust/wsdl': 'wst_soap',
- 'http://schemas.xmlsoap.org/ws/2004/08/addressing': 'wsa',
- 'http://www.w3.org/2000/09/xmldsig#': 'xmldsig',
- 'http://schemas.xmlsoap.org/ws/2005/02/trust': 'wst',
- 'http://schemas.xmlsoap.org/ws/2003/06/secext': 'secext',
- 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd': 'oasisse',
- 'http://schemas.xmlsoap.org/ws/2004/09/policy': 'wsp',
- 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd': 'secutil',
- 'http://www.w3.org/XML/1998/namespace': 'xmlnsp',
- 'http://schemas.microsoft.com/Passport/SoapServices/PPCRL': 'ps',
- 'http://schemas.xmlsoap.org/ws/2003/06/utility': 'wsu' }
-
- def __gen(filepath):
- old_dir = os.getcwd()
- (head, tail) = path.split(filepath)
- os.chdir(head)
-
- try:
- generate(file = tail, address = True)
- finally:
- os.chdir(old_dir)
-
-
- __GENERATE = False
- if __GENERATE:
- __gen(WSDL_PATH)
-
-
- try:
- from WSTrust_client import *
- from WSTrust_types import *
- import WSTrust_client
- import WSTrust_types
- except ImportError:
- __gen(WSDL_PATH)
- from WSTrust_client import *
- from WSTrust_types import *
- import WSTrust_client
- import WSTrust_types
-
- from ZSI.schema import GTD
- nskeys = list((lambda .0: for k in .0:
- if k.startswith('ns'):
- kcontinue)(globals().iterkeys()))
- nss = []
- for key in nskeys:
- g = globals()
- nsclass = g[key]
- nss.append(nsclass)
- g[_nsdict[nsclass.targetNamespace]] = nsclass
-
- del nskeys
- for namespace in nss:
- for clsname in namespace.__dict__.keys():
- if clsname.endswith('_Def'):
- name = clsname[:-4]
-
- try:
- pname = (namespace.targetNamespace, name)
- pyclass = GTD(*pname)(pname).pyclass
- except Exception:
- e = None
- print 'Error making pyclass for %s. error was %r' % (pname, e)
- except:
- None<EXCEPTION MATCH>Exception
-
-
- None<EXCEPTION MATCH>Exception
- if clsname.endswith('_Dec'):
- name = clsname[:-4]
- pname = (namespace.targetNamespace, name)
-
- try:
- pyclass = getattr(namespace, clsname)().pyclass
- except Exception:
- e = None
- print 'Error making pyclass for %s. error was %r' % (pname, e)
- except:
- None<EXCEPTION MATCH>Exception
-
-
- None<EXCEPTION MATCH>Exception
- if name in vars(namespace):
- print 'Found two instances of the name "%s". (%r and %r)' % (name, getattr(namespace, name), pyclass)
- continue
- setattr(namespace, name, pyclass)
-
-
- if __name__ == '__main__' and not __GENERATE:
- __gen(__file__, WSDL_PATH)
- from WSTrust_client import *
- from WSTrust_types import *
- import WSTrust_client
- import WSTrust_types
-
-