Posted: 6 Feb 2020 8:58 EST Last activity: 18 Feb 2020 9:42 EST
API SOAP in Pega
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.
This appears to be an error coming from the service itself, but the message is generic, so it is not really helpful in determining what (if anything) you are not sending or what might be the cause of the problem. Without being able to get hands-on with your WSDL, it is going to be a challenge to assist you here. You might try opening a support request, however since the problem is likely with your service implementation, they might not be able to assist you as they can really only assure that the SOAP component works and not all of the details required to use it with every possible web service. You might also speak with your Pega contacts about getting some support from our services team.