Welcome Guest! Log in

Topic-icon Question XML file reject cause

More
20 Oct 2016 16:37 #1 by MOUDEN_Kenza
MOUDEN_Kenza created the topic: XML file reject cause
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).

Please Log in or Create an account to join the conversation.

More
25 Oct 2016 14:29 #2 by Thomas BLETON
Thomas BLETON replied the 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.

Please Log in or Create an account to join the conversation.

More
25 Oct 2016 15:46 #3 by MOUDEN_Kenza
MOUDEN_Kenza replied the 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?

Please Log in or Create an account to join the conversation.

More
25 Oct 2016 18:29 - 25 Oct 2016 18:31 #4 by Thomas BLETON
Thomas BLETON replied the 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.

Please Log in or Create an account to join the conversation.

More
25 Oct 2016 18:38 #5 by MOUDEN_Kenza
MOUDEN_Kenza replied the topic: XML file reject cause
Hi,
Thank you, I'll see.

Please Log in or Create an account to join the conversation.