Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…

Topic-icon Question XML file reject cause

More
20 Oct 2016 16:37 #1 by MOUDEN_Kenza
XML file reject cause was created by MOUDEN_Kenza
Hi,
I have a process that can verify an XML file with the xsd definition, accepted for a good format and rejected for a wrong one.
I would like to know if there is a possibility with stambia (other than the message error shown in the process) to have information about where exactly had occured the error, that is to say to know both the field and the cause of the error (for example rejected file due to the field x which is mandatory and it's not mentionned).
More
25 Oct 2016 14:29 #2 by Thomas BLETON
Replied by Thomas BLETON on topic XML file reject cause
Hello,
For the moment, Stambia DI does not have such feature as a native component.
One possibility is to look for a java(script) library which does the job, and incorporate it in your process.
More
25 Oct 2016 15:46 #3 by MOUDEN_Kenza
Replied by MOUDEN_Kenza on topic XML file reject cause
Hello,
Thank you for your replay;
If you don't mind, can you give me an exemple and how can I incorporate it in a process?
More
25 Oct 2016 18:29 - 25 Oct 2016 18:31 #4 by Thomas BLETON
Replied by Thomas BLETON on topic XML file reject cause
Hi,
Here is a small example.
It takes these parameters:
- xml file path
- xsd file path
- checkbox to choose if you want to raise an error when xml is invalid

See the beanshell scripting action, it publishes these variables: XML_IS_VALID and XML_PARSE_ERROR

I invite you to see how it works and adapt it to your needs :)

Attachments:
Last edit: 25 Oct 2016 18:31 by Thomas BLETON.
More
25 Oct 2016 18:38 #5 by MOUDEN_Kenza
Replied by MOUDEN_Kenza on topic XML file reject cause
Hi,
Thank you, I'll see.