Problem mapping Response data to clipboard for automatically generated SOAP connector
We use Pega 7.1.9 and I need SOAP Integration Connectors for about 50 web services. As proof of concept for the first web service, I use the Pega SOAP integration wizard to automatically create the Parse XML rule, the XML stream rule, the connector rule, the properties and classes. Then I create an activity with a "Connect-SOAP" step to call the web service, and when I run the activity the response data is stored as XML in a single text property. So far this works exactly as intended, the auto generated Parse XML rules are intended to deliver the Response as a single XML property.
My problem: I don't know how to extract the needed results from the XML response text. What I need is an activity, or internal Pega activity or Function that accepts the XML as 'input' and expands it into nested clipboard pages and properties (XML response is attached) I have tried:
Inbuilt Pega activity XMLDocToPage - this runs without error, but it does not extract the properties from the XML. I think it expects the clipboard structure to be built beforehand, but I want the clipboard structure to be 'built' from the returned XML structure,
Use a step with an Apply-Parse-XML rule, using the automatically generated Parse XML rule. This runs without error, but does not produce any output (eg it does not set up the properties). Again I think the auto generated Parse XML rule returns the response as a single XML value.
I know I can create individual Parse XML rules customized for the output of each web service. But this will take a long time for 50 web services, and the required clipboard structure is implicit in the returned XML. Is there any way of automatically building the clipboard structure to represent the XML response?
Thank you for posting your question on the Product Support Community. In the course of troubleshooting, if you end up creating an SR, do share the SR number here on the thread so that we can track it for you.
Vidyaranjan A V | Community Moderator | Pegasystems Inc.
1. The web method responded with a single XML property because this was in its definition. Eg it returned a single text value containing XML instead of using the XSD to specify the structure of the returned data. So Pega was doing the correct thing in terms of showing a single text property containing XML. To fix this I have to improve the web method to use the correct XSD types.
2. Is there a Pega activity that can expand a single text property containing XML into the correct clipboard structure? I don't think there is an activity, but based on XMLDocToPage (which is written in Java) a custom activity using Java could be created to do this.