0
votes

I am developing a composite in Oracle SOA Suite 12c. As part of the design we have a BPEL process with a file adapter that polls for incoming xml payloads. The process will validate the XML file against a native schema. As soon as the BPEL process finds the first validation issue in the payload it errors out.

I wanted to check if there is any way to get a list of all the schema validation issues in an incoming payload so that I can notify the sender, with the list of all the fields where they have populated data in incorrect format. I would appreciate some direction on how to fix the problem.

Thanks!

2

2 Answers

0
votes

I'm going on the assumption that you're using the Native Format Builder Wizard to generate an nXSD schema against a file supplied to you which, in turn, is used by the File Adapter. I'm not sure if there is a way to get a list of all the schema validation issues in one pass but you might be able to leverage the command line tool for validating nXSD Translations until you figure out a cleaner solution.

I can see this being used in a couple of ways:

  1. Through a Java callout in your BPEL process, you could use the Oracle XDK libraries (used by the nxsd translator command line tool) to parse the XML and perform your validation that way.

  2. Have a "sanitation process" (shell script, or something similiar) prior to moving the file to your "inbound directory" used by the File Adapter to test the XML file. Should there be any validation issue, your script could generate an email back to the supplier with the details.

Oracle has some documentation available here on the details of using the NXSD Translator command line tool.

In an effort to avoid link rot, the documentation I'm referring to is in the "Oracle Fusion Middleware Understanding Technology Adapters" document, under the section named "Native Format Builder Wizard".

0
votes

you can try to put all your logic inside a scope and add exception handler to catch and threw the exception to the user. I create an xsd for sending error response to the user, with the error code and description