Leveraging Intelligent Recommendations for Operational Transformation. AMS Partners click HERE | EMEA/APJ Partners click HERE |
12/21/2023 02:26 PM - edited 12/21/2023 02:56 PM
Hi All,
I have Created a workday SOAP connection and added following SOAP Writeback JSON, it is giving error as Invalid username or password , connection is successful, I tried using '+user.email+' instead of ${user.email} for each of variables , and no luck, not sure why its giving this error as connection is successful, kindly provide me guidance. Logs attached as well.
Note: I am writing only email back in first attempt, though I have second Option where I also need to writeback email to contingent worker
UPDATEUSERJSON
[{
"REQUESTXML": "${user.employeeType != null && user.employeeType != '' && user.employeeType.equals('Employee') && ((Calendar.getInstance().getTimeInMillis()) >= user.startdate.getTime()) ? '<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> <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:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body><bsvc:Workday_Account_for_Worker_Update bsvc:version=\"v41.0\"><bsvc:Worker_Reference><bsvc:Employee_Reference><bsvc:Integration_ID_Reference><bsvc:ID bsvc:System_ID=\"WD-EMPLID\">${user.employeeid}</bsvc:ID></bsvc:Integration_ID_Reference></bsvc:Employee_Reference></bsvc:Worker_Reference><bsvc:Workday_Account_for_Worker_Data><bsvc:User_Name>${user.email}</bsvc:User_Name></bsvc:Workday_Account_for_Worker_Data></bsvc:Workday_Account_for_Worker_Update></soapenv:Body> </soapenv:Envelope>' : '<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> <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:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body><bsvc:Workday_Account_for_Worker_Update bsvc:version=\"v41.0\"><bsvc:Worker_Reference><bsvc:Contingent_Worker_Reference><bsvc:Integration_ID_Reference><bsvc:ID bsvc:System_ID=\"WD-EMPLID\">${user.employeeid}</bsvc:ID></bsvc:Integration_ID_Reference></bsvc:Contingent_Worker_Reference></bsvc:Worker_Reference><bsvc:Workday_Account_for_Worker_Data><bsvc:User_Name>${user.email}</bsvc:User_Name></bsvc:Workday_Account_for_Worker_Data></bsvc:Workday_Account_for_Worker_Update></soapenv:Body> </soapenv:Envelope>'}"
},
{
"REQUESTXML": "${user.username != null && user.username != '' && user.employeeType != null && user.employeeType != '' && user.employeeType.equals('Employee') ? '<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> <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:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body><bsvc:Maintain_Contact_Information_for_Person_Event_Request bsvc:Add_Only=\"false\" bsvc:version=\"v41.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.employeeid}</bsvc:ID></bsvc:Worker_Reference><bsvc:Effective_Date>${CURRENT_PROV_TIMESTAMP}</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>' : '<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> <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:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body><bsvc:Maintain_Contact_Information_for_Person_Event_Request bsvc:Add_Only=\"false\" bsvc:version=\"v41.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=\"Contingent_Worker_ID\">${user.customproperty14}</bsvc:ID></bsvc:Worker_Reference><bsvc:Effective_Date>${CURRENT_PROV_TIMESTAMP}</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>'}"
}
]
Also I tried below default JSON available the same error it is giving:
<bsvc:Maintain_Contact_Information_for_Person_Event_Request bsvc:Add_Only="false" bsvc:version="${API_VERSION}"><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.employeeid}</bsvc:ID></bsvc:Worker_Reference><bsvc:Effective_Date>${CURRENT_PROV_TIMESTAMP}</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>
Thanks
Mahesh
Solved! Go to Solution.
12/21/2023 03:38 PM
12/22/2023 08:15 AM
Hi Rushikesh,
I appreciate your feedback on this.
I see they have some invalid parameters, which is not a case for me as I dont see such error in logs, mine shows me that authentication is an issue, so looks like below error is coming probably my JSON username , password variables are not getting interpreted and it is not able to read the username/password from connection as the variable is not recognized so, not sure what change I can make to JSON to correct that. It would be great if someone could point me here. I am trying to figureout this as I dont see any such post on these forums as well looks like.
"2023-12-21T21:51:32.302+00:00","ecm-worker","","","","2023-12-21T21:51:31.657659065Z stdout F faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client.authenticationError"
"2023-12-21T21:51:32.302+00:00","ecm-worker","","","","2023-12-21T21:51:31.657673065Z stdout F {http://xml.apache.org/axis/}stackTrace:invalid username or password"
Thanks
Mahesh
01/08/2024 06:57 AM
Hi Team,
I am looking for an inputs following is my WD writeback XML and , I am getting an error:
How should I correct, seems its expecting ">" or "/>" before Workday_Account_for_Worker_Update
[{"CONNECTION": "login","REQUESTXML": "${user.employeeType != null && user.employeeType != '' && user.employeeType.equals('Employee') && ((Calendar.getInstance().getTimeInMillis()) >= user.startdate.getTime()) ? '<env:Envelope xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\"> <env:Header> <wsse:Security env:mustUnderstand=\"1\"> <wsse:UsernameToken> <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:UsernameToken> </wsse:Security> </env:Header> <env:Body> <wd:Workday_Account_for_Worker_Update xmlns:wd=\"urn:com.workday/bsvc wd:version=\"v41.0\"> <wd:Worker_Reference> <wd:Employee_Reference> <wd:Integration_ID_Reference> <wd:ID wd:System_ID=\"WD-EMPLID\">${user.employeeid}</wd:ID> </wd:Integration_ID_Reference> </wd:Employee_Reference> </wd:Worker_Reference> <wd:Workday_Account_for_Worker_Data> <wd:User_Name>${user.email}</wd:User_Name> </wd:Workday_Account_for_Worker_Data> </wd:Workday_Account_for_Worker_Update></env:Body> </env:Envelope>':'<?xml version=\"1.0\" encoding=\"UTF-8\"?> <env:Envelope xmlns:env= \"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> <env:Body> <wd:Workday_Account_for_Worker_Update xmlns:wd=\"urn:com.workday/bsvc\" wd:version=\"${API_VERSION}\"> <wd:Worker_Reference> <wd:Contingent_Worker_Reference> <wd:Integration_ID_Reference> <wd:ID wd:System_ID=\"WD-EMPLID\">${user.employeeid}</wd:ID> </wd:Integration_ID_Reference> </wd:Contingent_Worker_Reference> </wd:Worker_Reference> <wd:Workday_Account_for_Worker_Data> <wd:User_Name>${user.email}</wd:User_Name> </wd:Workday_Account_for_Worker_Data> </wd:Workday_Account_for_Worker_Update> </env:Body> </env:Envelope>'}"}]
Error:
"2024-01-08T14:23:01.579+00:00","ecm-worker","","","","2024-01-08T14:23:00.994896058Z stdout F faultString: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 611; Element type "wd:Workday_Account_for_Worker_Update" must be followed by either attribute specifications, ">" or "/>"."
"2024-01-08T14:23:01.579+00:00","ecm-worker","","","","2024-01-08T14:23:00.994897958Z stdout F faultActor: "
"2024-01-08T14:23:01.579+00:00","ecm-worker","","","","2024-01-08T14:23:00.994899558Z stdout F faultNode: "
Thanks
Mahesh
01/08/2024 01:45 PM - edited 01/08/2024 01:49 PM
Hi All,
I am able to resolve above error by adding missing " on a tag.
Now I am getting below error
org.xml.sax.SAXException: Processing instructions are not allowed within SOAP messages
Attached logs, if anyone faced or knows solution please feel Free to comment.
Thanks
Mahesh
03/23/2024 09:50 PM - edited 03/23/2024 09:51 PM
were you able to resolve this?
If yes, Can you please share the update user json here for reference?
Thanks
03/25/2024 05:14 AM
Hi ,
Please find JSON below which worked
[ { "REQUESTXML": "${user.email != null && user.email != '' && user.employeeType=='Employee' ? ('<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:bsvc=\"urn:com.workday/bsvc\"><soapenv:Header><wsse:Security 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\" soapenv:mustUnderstand=\"1\"><wsse:UsernameToken><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:UsernameToken></wsse:Security></soapenv:Header><soapenv:Body><bsvc:Workday_Account_for_Worker_Update xmlns:bsvc=\"urn:com.workday/bsvc\" bsvc:version=\"v41.0\"><bsvc:Worker_Reference><bsvc:Employee_Reference><bsvc:Integration_ID_Reference><bsvc:ID bsvc:System_ID=\"WD-EMPLID\">'+user.employeeid+'</bsvc:ID></bsvc:Integration_ID_Reference></bsvc:Employee_Reference></bsvc:Worker_Reference><bsvc:Workday_Account_for_Worker_Data><bsvc:User_Name>'+user.email+'</bsvc:User_Name></bsvc:Workday_Account_for_Worker_Data></bsvc:Workday_Account_for_Worker_Update></soapenv:Body></soapenv:Envelope>') : ''}", "SOAPACTION": "soap.action.string", "RESPONSEMAPPING": { "task.comments": "Success" } }, { "REQUESTXML": "${user.email != null && user.email != '' && user.employeeType=='Contingent' ? ('<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:bsvc=\"urn:com.workday/bsvc\"><soapenv:Header><wsse:Security 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\" soapenv:mustUnderstand=\"1\"><wsse:UsernameToken><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:UsernameToken></wsse:Security></soapenv:Header><soapenv:Body><bsvc:Workday_Account_for_Worker_Update xmlns:bsvc=\"urn:com.workday/bsvc\" bsvc:version=\"v41.0\"><bsvc:Worker_Reference><bsvc:Contingent_Worker_Reference><bsvc:Integration_ID_Reference><bsvc:ID bsvc:System_ID=\"WD-EMPLID\">'+user.employeeid+'</bsvc:ID></bsvc:Integration_ID_Reference></bsvc:Contingent_Worker_Reference></bsvc:Worker_Reference><bsvc:Workday_Account_for_Worker_Data><bsvc:User_Name>'+user.email+'</bsvc:User_Name></bsvc:Workday_Account_for_Worker_Data></bsvc:Workday_Account_for_Worker_Update></soapenv:Body></soapenv:Envelope>') : ''}", "SOAPACTION": "soap.action.string", "RESPONSEMAPPING": { "task.comments": "Success" } } ]