Posted: 15 Apr 2019 11:17 EDT Last activity: 31 May 2019 10:49 EDT
Not able to Validate Multiple XSD's (XSD embedded with another XSD) in Parse XML
Hope you are doing well!!!
We have a requirement where in we have to validate the data in a single XML with Multiple XSD's (Meaning a main XSD has another XSD embedded which is called by using Import).
I expected this to work when i placed both the XSD's on a common server path and refer the same in the schema URL field(in XML Tab) in Parse XML but am getting following error message everytime when i tried that,
** FAIL : Unable to apply Rule-Parse-XML instance. Failed to parse XML. Error: Premature end of file.
I tried by first creating a Parse XML using these XSD's using Meta data wizard and then use the same for validation but am, unfortunately, getting the same error.
Am trying to figure out the other possibilities before going ahead and raise an SR.
I would appreciate if you can help me in figure out the issue!!!
I've seen use cases for this many times, so I know its feasible. I've always used the following approach.
Place all files in a directory off prsysmgmt .. such as testXML. This folder needs to contain the root xml file (or WSDL which is what I'm usually working with). The embedded files need to be in relative paths off this directory (depending on how they're referenced in import statements).
Then, you test this by loading the root file in IE ... hostname:port/prsysmgmt/testXML/parent.wsdl. If that loads without error, then you can reference same URL in integration wizard of Pega.
My experience is its best to have a Web Server serve up the files as in this above scenario as opposed to having the wizard open files directly.
Posted: 2 years ago
Posted: 16 Apr 2019 8:57 EDT
Paul Gentile (PaulGentile_GCS)
Sr. Software Solutions Engineer
Also, check the PegaRULES file to see where the EOF is happening. If it looks something like this example below, then you're most likely having "’network connection refused’" issue. This indicates the file is null or empty.
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)