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?