Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # op: login
- def login(self, request, **kw):
- if isinstance(request, loginRequest) is False:
- raise TypeError, "%s incorrect request type" % (request.__class__)
- # no input wsaction
- self.binding.Send(None, None, request, soapaction="", **kw)
- # no output wsaction
- response = self.binding.Receive(loginResponse.typecode)
- return response
- loginRequest = GED("urn:Xactly", "login").pyclass
- class login_Dec(ZSI.TCcompound.ComplexType, ElementDeclaration):
- literal = "login"
- schema = "urn:Xactly"
- def __init__(self, **kw):
- ns = ns1.login_Dec.schema
- TClist = [ZSI.TC.String(pname=(ns,"username"), aname="_username", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"password"), aname="_password", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"appName"), aname="_appName", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
- kw["pname"] = (u'urn:Xactly', u'login')
- kw["aname"] = "_login"
- self.attribute_typecode_dict = {}
- ZSI.TCcompound.ComplexType.__init__(self,None,TClist,inorder=0,**kw)
- class Holder:
- __metaclass__ = pyclass_type
- typecode = self
- def __init__(self):
- # pyclass
- self._username = None
- self._password = None
- self._appName = None
- return
- Holder.__name__ = "login_Holder"
- self.pyclass = Holder
- import XServiceService_client
- import XServiceService_server
- import XServiceService_types
- service = XServiceService_client.XServiceServiceLocator().getDiscoveryService("http://www.xxxxxx.com/icm/services/xxxxxxxx")
- user = "xxxx@xxxxx.com"
- psw = "abc123"
- app = "Incent"
- creds = {'user':user , 'password':psw, 'appName':app}
- request = XServiceService_client.loginRequest(**creds)
- response = service.login(request)
- Traceback (most recent call last):
- File "C:PYTHONSOAPTest.py", line 12, in <module>
- request = XServiceService_client.loginRequest(**creds)
- TypeError: __init__() got an unexpected keyword argument 'password'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement