How to access an xsd file from a Rule-File-Text instance through a web URL
Here is a scenario that you might find useful while working with files on the Pega 7 Platform.
Scenario: I have an xsd file located in the application server directory that is being used in the schema URL property in the Parse XML of SOAP request. Is it possible to save the xsd file as a Rule-File-Text instance and access it through a web URL?
Solution:
Following are the steps for accessing the file through URL using the Rule-File-Text instance:
- Create an instance of Rule-File-Text containing your XSD content. (Say, the keys are webwb.sample.xsd)
- Create a data page and use a load activity or data transform as data source to set a property containing the URL to the rule-file-text instance.
URL = pxRequestor.pxReqContextURI + pxRequestor.pxReqPathInfoReal + "/webwb/sample.xsd"
- In the schema URL field in parse xml rule, reference the property on the data page using Global Resource Settings (GRS) syntax.
For more information, see How to reduce maintenance of service rules and listeners with global resource settings.