Author |
Message
|
Rahul999 |
Posted: Sat Jul 17, 2010 7:22 am Post subject: Can I use toolkit to validate a XML msg across *.mxsd file |
|
|
 Centurion
Joined: 14 Mar 2007 Posts: 134
|
Hi All,
we have a message flow where we have schema validation based on a message set(with multiple mxsd files). Now, whenever the schema validation fail and broker throws an error, I have to manually go and check the message and compare it with mxsd(whether all the mandatory fields are present or not, whether field type are correct or not). I was thinking if message broker toolkit provides that facility so that I can take a XML message and validate it based on a mxsd file which is already present in the Toolkit workspace?
Any suggestion friends? |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Jul 17, 2010 8:32 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Put a trace node after the validation node and output the $Exception (Exception tree).
It should tell you what field failed validation and the reason for it.
However when you have more than 1 error, it still is an iterative process. (Fix one, hit the next one).
I would think that you really would want to use an XML tool to validate against the xsds. If you don't have xsd files you can generate them from the mxsds using the toolkit.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Rahul999 |
Posted: Sun Jul 18, 2010 12:17 am Post subject: |
|
|
 Centurion
Joined: 14 Mar 2007 Posts: 134
|
fjb_saper wrote:
Quote: |
Put a trace node after the validation node and output the $Exception (Exception tree).
It should tell you what field failed validation and the reason for it.
However when you have more than 1 error, it still is an iterative process. (Fix one, hit the next one). |
Thanks for your suggestion, but we can not enable trace node, our Infra team would not allowed that in SIT environment or higher.
fjb_saper wrote:
Quote: |
I would think that you really would want to use an XML tool to validate against the xsds. If you don't have xsd files you can generate them from the mxsds using the toolkit. |
Seems I have to rely on an external tool, I thought message Broker might provide this facility to us.
Thanks _________________ "For all your days be prepared, and meet them ever alike.
When you are the anvil, bear - when you are the hammer, strike."
- Edwin Markham |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Jul 18, 2010 5:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you tried importing the message into the tool as a test message?
You could also just run it through your development / QA environment and have that wired to a trace node on failure of the validation node...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Jul 18, 2010 5:31 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
It might be worth looking at the XML Validator Node support pack.
Follow the support pack links from the top of the page. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Jul 19, 2010 12:18 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
The is a nice set of XML facillities provided with some of the Eclipse-based IBM tools. It includes the ability to associate an XML schema with an XML instance document, and then you see the errors in the Problems view in the normal Eclipse style.
If you have WID or some other RAD-based toolkit installed then it's worth checking that out - just create a new project, and look for project types with 'XML' in the name.
Apologies for being vague there - maybe someone else will be able to fill in some details. |
|
Back to top |
|
 |
Amitha |
Posted: Mon Jul 19, 2010 8:41 pm Post subject: |
|
|
 Voyager
Joined: 20 Nov 2009 Posts: 80 Location: Newyork
|
|
Back to top |
|
 |
|