source: TI12-security/trunk/python/Tests/AttAuthority/AttAuthorityClient.py @ 1696

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/Tests/AttAuthority/AttAuthorityClient.py@1696
Revision 1696, 857 bytes checked in by pjkersha, 13 years ago (diff)

Working test code for ZSI Web Service using Twisted:

  • for server, used wsdl2dispatch - but make sure to edit the return types

in AttAuthority_services_server server class stubs to return request, response
tuple as required by Twisted interface. Created .tac file which loads a
sub class of the wsdl2dispatch generated class.

  • tested with standard ZSI client using stubs generated from wsdl2py. Also

tested with Twisted client - stubs generated with wsdl2py including the -w
option.

  • Property svn:executable set to *
Line 
1#!/usr/bin/env python
2#from twisted.python import log
3#from twisted.internet import reactor
4
5from AttAuthority_services import AttAuthorityServiceLocator
6
7def main(**kw):
8    locator = AttAuthorityServiceLocator()
9    port = locator.getAttAuthority(**kw)
10    import pdb;pdb.set_trace()
11    attCert = port.getAttCert("USER CERT")
12    print "attCert = %s" % attCert
13   
14    # Factory METHOD Just guessing here
15    #response = port.create(CLIENT.CreateRequest())
16    #kw['endPointReference'] = response._EndpointReference
17    #iport = locator.getAttAuthority(**kw)
18#    reactor.stop()
19
20
21if __name__ == '__main__':
22    main(url="http://127.0.0.1:5700/AttributeAuthority")
23#    op = GetBasicOptParser()
24#    (options, args) = op.parse_args()
25#   
26#    SetUp(options)
27#    kw = GetPortKWArgs(options)
28#    reactor.callWhenRunning(main, **kw)
29#    reactor.run()
Note: See TracBrowser for help on using the repository browser.