Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

workday SOAP email write back not working + soap

musthak_ahamad
Regular Contributor
Regular Contributor

am using the workday OOB soap  update user json to update email, i tried to test the OOB json that is given in wokday document after correcting multiple errors am getting below error. anybody faced this  issue.

ERROR: 

2024-07-23T18:40:44-04:00-ecm-worker-provisoning.SoapProvisioningService-quartzScheduler_Worker-3-76xfb-ERROR-Error occured in updating users
 
2024-07-23T18:40:44-04:00-ecm-worker--null-76xfb--org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{"CONNECTION":"login","REQUESTXML":"${user.email != null && user.email != '' ? ('<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:bsvc=\"urn:com.workday/bsvc\"><soapenv:Header> <wsse:Security soapenv:mustUnderstand=\"1\" xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\"><wsse:UsernameToken wsu:Id=\"UsernameToken-64DBF26FBA30D3CCB6146964280369918\"> <wsse:Username>' +USERNAME + '<\/wsse:Username> <wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">' +PASSWORD+'<\/wsse:Password><wsse:Nonce EncodingType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary\">lLP+oysknDXxg0ZcnRTUXg==<\/wsse:Nonce><\/wsse:UsernameToken> <\/wsse:Security> <\/soapenv:Header> <soapenv:Body> <bsvc:Maintain_Contact_Information_for_Person_Event_Request bsvc:Add_Only=\"false\" bsvc:version=\"v31.0\"> <bsvc:Business_Process_Parameters> <bsvc:Auto_Complete>true<\/bsvc:Auto_Complete> <bsvc:Run_Now>true<\/bsvc:Run_Now><\/bsvc:Business_Process_Parameters> <bsvc:Maintain_Contact_Information_Data> <bsvc:Worker_Reference bsvc:Descriptor=\"?\"><bsvc:ID bsvc:type=\"Employee_ID\">'+user.username+'<\/bsvc:ID> <\/bsvc:Worker_Reference> <bsvc:Effective_Date>'+new Date().format(DATEFORMAT)+'<\/bsvc:Effective_Date><bsvc:Worker_Contact_Information_Data> <bsvc:Email_Address_Data> <bsvc:Email_Address>'+user?.email+'<\/bsvc:Email_Address> <bsvc:Usage_Data bsvc:Public=\"true\"> <bsvc:Type_Data bsvc:Primary=\"true\"> <bsvc:Type_Reference bsvc:Descriptor=\"work\"> <bsvc:ID bsvc:type=\"Communication_Usage_Type_ID\">WORK<\/bsvc:ID><\/bsvc:Type_Reference> <\/bsvc:Type_Data> <\/bsvc:Usage_Data> <\/bsvc:Email_Address_Data> <\/bsvc:Worker_Contact_Information_Data> <\/bsvc:Maintain_Contact_Information_Data> <\/bsvc:Maintain_Contact_Information_for_Person_Event_Request> <\/soapenv:Body> <\/soapenv:Envelope>') : ''}"}' with class 'org.codehaus.groovy.grails.web.json.JSONObject' to class 'java.util.List' due to: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: java.util.List(org.codehaus.groovy.grails.web.json.JSONObject) at com.saviynt.provisoning.SoapProvisioningService.updateUserSOAP(SoapProvisioningService.groovy:3642) at com.saviynt.ecm.services.ArsTaskService.updateUserTarget(ArsTaskService.groovy:11500) at com.saviynt.ecm.services.ArsTaskHelperService$_whenTaskTypeIsNineUpdateUser_closure48.doCall(ArsTaskHelperService.groovy:2974) at com.saviynt.ecm.services.ArsTaskHelperService.whenTaskTypeIsNineUpdateUser(ArsTaskHelperService.groovy:2969) at com.saviynt.ecm.services.ArsTaskHelperService$_completeAutoProvTasksUpgraded_closure1.doCall(ArsTaskHelperService.groovy:195) at com.saviynt.ecm.services.ArsTaskHelperService.completeAutoProvTasksUpgraded(ArsTaskHelperService.groovy:160) at MultipleProvisioningJob.execute(MultipleProvisioningJob.groovy:222) at org.quartz.core.JobRunShell.run(JobRunShell.java:199) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)

JSON:

[{"REQUESTXML": "${user.email != null && user.email != '' ? ('<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:bsvc=\"urn:com.workday/bsvc\"><soapenv:Header> <wsse:Security soapenv:mustUnderstand=\"1\" xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\"><wsse:UsernameToken wsu:Id=\"UsernameToken-64DBF26FBA30D3CCB6146964280369918\"> <wsse:Username>' +USERNAME + '</wsse:Username> <wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">' +PASSWORD+'</wsse:Password><wsse:Nonce EncodingType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary\">lLP+oysknDXxg0ZcnRTUXg==</wsse:Nonce></wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <bsvc:Maintain_Contact_Information_for_Person_Event_Request bsvc:Add_Only=\"false\" bsvc:version=\"v31.0\"> <bsvc:Business_Process_Parameters> <bsvc:Auto_Complete>true</bsvc:Auto_Complete> <bsvc:Run_Now>true</bsvc:Run_Now></bsvc:Business_Process_Parameters> <bsvc:Maintain_Contact_Information_Data> <bsvc:Worker_Reference bsvc:Descriptor=\"?\"><bsvc:ID bsvc:type=\"Employee_ID\">'+user.username+'</bsvc:ID> </bsvc:Worker_Reference> <bsvc:Effective_Date>'+new Date().format(DATEFORMAT)+'</bsvc:Effective_Date><bsvc:Worker_Contact_Information_Data> <bsvc:Email_Address_Data> <bsvc:Email_Address>'+user?.email+'</bsvc:Email_Address> <bsvc:Usage_Data bsvc:Public=\"true\"> <bsvc:Type_Data bsvc:Primary=\"true\"> <bsvc:Type_Reference bsvc:Descriptor=\"work\"> <bsvc:ID bsvc:type=\"Communication_Usage_Type_ID\">WORK</bsvc:ID></bsvc:Type_Reference> </bsvc:Type_Data> </bsvc:Usage_Data> </bsvc:Email_Address_Data> </bsvc:Worker_Contact_Information_Data> </bsvc:Maintain_Contact_Information_Data> </bsvc:Maintain_Contact_Information_for_Person_Event_Request> </soapenv:Body> </soapenv:Envelope>') : ''}"}]

this is my recent json still facing same error , if anyone have working updateuserjson in txt format will help. or you can validate the current attached json.

[This message has been edited by moderator to merge reply comment]

2 REPLIES 2

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @musthak_ahamad,

Please refer the below post,
https://forums.saviynt.com/t5/saviynt-knowledge-base/write-back-generated-email-address-for-onboarde... 

Thanks,

If you find the above response useful, Kindly Mark it as "Accept As Solution".

musthak_ahamad
Regular Contributor
Regular Contributor

it worked for me , there is nothing wrong with the json , the WSDL URL is issue , after correcting it the above json worked fine.