cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to use soap execute against workday?

sdeng
New Contributor II

Do I have to update Customize envelope? or just generate the template? I always got an error when use soap execute for Put_Provisioning_Group_Assignment. The same column mapping is working for workday write snap.
image

3 REPLIES 3

tlikarish
Employee
Employee

Iโ€™m not really a soap expert, but from what I understand you configure the snap with a WSDL and then can use that and incoming data to generate the soap envelope.

Maybe if you share more information about the pipeline and how the snap is configured I can provide some more pointers.

Also, here is a video that talks about how to use Soap in SnapLogic. You can also refer to the documentation.

sdeng
New Contributor II

Yes, hereโ€™s the code generated:
<SOAP-ENV:Envelope
xmlns:SOAP-ENV=โ€œhttp://schemas.xmlsoap.org/soap/envelope/โ€
xmlns:ns0=โ€œurn:com.workday/bsvcโ€>
SOAP-ENV:Header
ns0:Workday_Common_Header
ns0:Include_Reference_Descriptors_In_Response$Include_Reference_Descriptors_In_Response</ns0:Include_Reference_Descriptors_In_Response>
</ns0:Workday_Common_Header>
</SOAP-ENV:Header>
SOAP-ENV:Body
<ns0:Put_Provisioning_Group_Assignment_Request ns0:version=โ€œ$versionโ€>
<ns0:Provisioning_Group_Assignment_Reference ns0:Descriptor=โ€œ$Provisioning_Group_Assignment_Reference.Descriptorโ€>#foreach($ID in $Provisioning_Group_Assignment_Reference.ID)
<ns0:ID ns0:type=โ€œ$ID.typeโ€>$ID.value</ns0:ID>#end
</ns0:Provisioning_Group_Assignment_Reference>
ns0:Provisioning_Group_Assignment_Data
<ns0:Person_Reference ns0:Descriptor=โ€œ$Provisioning_Group_Assignment_Data.Person_Reference.Descriptorโ€>#foreach($ID in $Provisioning_Group_Assignment_Data.Person_Reference.ID)
<ns0:ID ns0:type=โ€œ$ID.typeโ€>$ID.value</ns0:ID>#end
</ns0:Person_Reference>
<ns0:Worker_Reference ns0:Descriptor=โ€œ$Provisioning_Group_Assignment_Data.Worker_Reference.Descriptorโ€>#foreach($ID in $Provisioning_Group_Assignment_Data.Worker_Reference.ID)
<ns0:ID ns0:type=โ€œ$ID.typeโ€>$ID.value</ns0:ID>#end
</ns0:Worker_Reference>
ns0:Provisioning_Group$Provisioning_Group_Assignment_Data.Provisioning_Group</ns0:Provisioning_Group>
ns0:Status$Provisioning_Group_Assignment_Data.Status</ns0:Status>
ns0:Last_Changed$Provisioning_Group_Assignment_Data.Last_Changed</ns0:Last_Changed>
</ns0:Provisioning_Group_Assignment_Data>
</ns0:Put_Provisioning_Group_Assignment_Request>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Updated to below:
<SOAP-ENV:Envelope
xmlns:SOAP-ENV=โ€œhttp://schemas.xmlsoap.org/soap/envelope/โ€
xmlns:ns0=โ€œurn:com.workday/bsvcโ€>
SOAP-ENV:Header
ns0:Workday_Common_Header
ns0:Include_Reference_Descriptors_In_Response$Include_Reference_Descriptors_In_Response</ns0:Include_Reference_Descriptors_In_Response>
</ns0:Workday_Common_Header>
</SOAP-ENV:Header>
SOAP-ENV:Body
<ns0:Put_Provisioning_Group_Assignment_Request ns0:version=โ€œ$versionโ€>
<ns0:Provisioning_Group_Assignment_Reference ns0:Descriptor=โ€œ$Provisioning_Group_Assignment_Reference.Descriptorโ€>#foreach($ID in $Provisioning_Group_Assignment_Reference.ID)
<ns0:ID ns0:type=โ€œ$ID.typeโ€>$ID.value</ns0:ID>#end
</ns0:Provisioning_Group_Assignment_Reference>
ns0:Provisioning_Group_Assignment_Data
<ns0:Person_Reference ns0:Descriptor=โ€œ$Provisioning_Group_Assignment_Data.Person_Reference.Descriptorโ€>#foreach($ID in $Provisioning_Group_Assignment_Data.Person_Reference.ID)
<ns0:ID ns0:type=โ€œ$ID.typeโ€>$ID.value</ns0:ID>#end
</ns0:Person_Reference>
<ns0:Worker_Reference ns0:Descriptor=โ€œ$Provisioning_Group_Assignment_Data.Worker_Reference.Descriptorโ€>foreach($ID in $Provisioning_Group_Assignment_Data.Worker_Reference.ID)
<ns0:ID ns0:type=โ€œ$ID.typeโ€>$ID.value</ns0:ID>end
</ns0:Worker_Reference>
ns0:Provisioning_Group$Provisioning_Group_Assignment_Data.Provisioning_Group</ns0:Provisioning_Group>
ns0:Status$Provisioning_Group_Assignment_Data.Status</ns0:Status>
ns0:Last_Changed$Provisioning_Group_Assignment_Data.Last_Changed</ns0:Last_Changed>
</ns0:Provisioning_Group_Assignment_Data>
</ns0:Put_Provisioning_Group_Assignment_Request>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

In the mapper before, I map it like below:
image

got below error:
Failure: Unable to write key: $.ID.type, Reason: Expecting object for JSON-Path field reference โ€˜typeโ€™, found: String, Resolution: Please file a defect against the snap

@sdeng Did you ever get this working successfully via soap execute? I have this working for a get request, but not for a submit. curious about the soap template, and how that factors into the solution. Any advice?