Question
API SOAP in Pega
Hi all,
I am trying to create automation using the SOAP API and I have a problem referring to the "SaveDocument" method - I don't know how to refer to the "Components" parameter. I enclose two screenshots: one presents part of the method and the other shows the automation in PEGA.
This is what I am trying to do:
1. create a Global Container and place ServiceClient in it
2. put the WSDL address in the ServiceClient
3. create an automation in which I want to call the GetBarcodeForDoc and SaveDocument methods. The GetBarcodeForDoc method returns a barcode number - it works. However, in the SaveDocument method, we cannot add ComponentType and PropertyType to the DocumentType property.
Do you have any hints how to add this component?
Should we additionally call Components and Properties somehow? If so, how? What is worth to add is that the Components can have several ComponentTypes in it. Should I add somewhere this information?
You are on the right track in that you will need to create instances of these objects. Since one of these appears to be an array, you'll likely need to create that in a script and add each instance to it. Complex types like these are usually best done in your own script or custom component as dealing with the multiple instances of each type limits you to a fixed number of instances that you'd create in an automation.
Without actually touching your WSDL, it will be hard to offer specific suggestions, but from your screenshot it looks like you understand the concept of creating instances of each type and passing that instance (the this property) to the correct parameter.