Created
November 11, 2014 20:00
-
-
Save cablehead/75c5ed7bd9a5c373aee9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from suds.client import Client | |
from suds.wsse import Security | |
from suds.wsse import UsernameToken | |
URL = 'https://wd5-impl-services1.workday.com/ccx/service/osv_uber1/Human_Resources/v22.1?wsdl' | |
USERNAME = '...' | |
PASSWORD = '...' | |
def main(): | |
client = Client(URL) | |
security = Security() | |
token = UsernameToken(USERNAME, PASSWORD) | |
security.tokens.append(token) | |
client.set_options(wsse=security) | |
response_group = client.factory.create('ns0:Worker_Response_GroupType') | |
for field in dir(response_group): | |
if field.startswith('Include') and field != 'Include_Photo': | |
setattr(response_group, field, True) | |
response_filter = client.factory.create('ns0:Response_FilterType') | |
response_filter.Page = 2 | |
response_filter.Count = 50 | |
workers = client.service.Get_Workers( | |
Response_Filter=response_filter, | |
Response_Group=response_group) | |
# print client.last_sent() | |
print client.last_received() | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment