Soap API Python code to add new workday account (Operations:Add_Workday_Account)

384 views Asked by At

I am trying to add new workday account using python zeep module, can anyone help..

message = client.service.Add_Workday_Account('Human_ResourcesService', 'Add_Workday_Account',
                                                 {'User_Name':'....', 'Password':'....'}, xml)
1

There are 1 answers

0
Hikmat On

Please use the below code snippet.

Note: it use zeep

header = xsd.Element(
            '{urn:com.workday/bsvc}Workday_Common_Header',
            xsd.ComplexType([
                xsd.Element(
                    '{urn:com.workday/bsvc}Include_Reference_Descriptors_In_Response',
                    xsd.Boolean()),
            ])
        )
        workday_common_header = header(Include_Reference_Descriptors_In_Response=True)
        client_human_resource.service.Add_Workday_Account(_soapheaders=[workday_common_header],
                                                          Workday_Account_for_Worker_Data={
                                                              "User_Name": "myusername",
                                                              "Password": "test#@#@#81"
                                                          }
                                                          )