source: TI12-security/trunk/NDGSecurity/python/Tests/SimpleCA/SimpleCAClient.py @ 7080

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/NDGSecurity/python/Tests/SimpleCA/SimpleCAClient.py
Revision 7080, 915 bytes checked in by pjkersha, 9 years ago (diff)
  • Property svn:executable set to *
  • Property svn:keywords set to Id
Line 
1#!/bin/env python
2#
3# Exampe echo client, to show extended code generation in ZSI
4#
5# Import the client proxy object
6from SimpleCA_client import SimpleCABindingSOAP
7import wsSecurity
8#import pdb;pdb.set_trace()
9
10
11priKeyPwd = open('../tmp2').read().strip()
12certFilePath = '../Junk-cert.pem'
13priKeyFilePath = '../Junk-key.pem'
14
15# Signature handler object is passed to binding
16signatureHandler = wsSecurity.SignatureHandler(certFilePath=certFilePath,
17                                               priKeyFilePath=priKeyFilePath,
18                                               priKeyPwd=priKeyPwd)
19
20# Instantiate a client proxy object, then call it
21simpleCAPx = SimpleCABindingSOAP("http://localhost:5001/SimpleCAServIn")#,
22                                 #sig_handler=signatureHandler)
23
24try:
25    print simpleCAPx.reqCert("Test INHERIT String")
26except Exception, e:
27    print "Error calling certificate request: ", e
28
Note: See TracBrowser for help on using the repository browser.