示例#1
0
 def setUp(self):
     url = 'http://localhost:8080/tmis-ws-medipad/tmis-medipad?wsdl'
     # do not cache wsdl documents
     self.client = Client(url, username='', password='', cache=None)
     # Authenticate
     authenticator = Authenticator()
     authData = authenticator.asAdmin()
     # Add auth headers
     tmisAuthNS = ('ta', 'http://korus.ru/tmis/auth')
     authHeader = Element('tmisAuthToken',
                          ns=tmisAuthNS).setText(authData.authToken.id)
     self.client.set_options(soapheaders=authHeader)
示例#2
0
    def setUp(self):
	url = 'http://localhost:8080/tmis-ws-laboratory/tmis-laboratory-integration?wsdl'
        self.client = Client(url, username='', password='', cache=None)
        
        medipadWsUrl = 'http://localhost:8080/tmis-ws-medipad/tmis-medipad?wsdl'
        self.medipadClient = Client(medipadWsUrl, username='', password='', cache=None)
        
        # Authenticate
        authenticator = Authenticator()
        authData = authenticator.asAdmin()

        # Add auth headers
        tmisAuthNS = ('ta', 'http://korus.ru/tmis/auth')
        authHeader = Element('tmisAuthToken', ns=tmisAuthNS).setText(authData.authToken.id)
        self.medipadClient.set_options(soapheaders=authHeader)
        
        db.initialize()