Author |
Message
|
sleepyjamie |
Posted: Mon Nov 16, 2015 9:17 am Post subject: Validating against XML Schema without Message Sets? |
|
|
Centurion
Joined: 29 Apr 2015 Posts: 135
|
I'm trying to validate an XML document which is being passed to HTTP Request node. I am trying to perform some validation before serializing to the wire. In past versions of WMB you needed to provide a message set to validate against. Thus, resulting in an excessive amount of projects within my workspace simply to do a validation.
In IIB9 is there anyway to validate against an XSD without having to create message set projects? |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 16, 2015 9:26 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Don't use a message set, use a message model  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Nov 16, 2015 9:30 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Import the xsd. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Vitor |
Posted: Mon Nov 16, 2015 9:43 am Post subject: Re: Validating against XML Schema without Message Sets? |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sleepyjamie wrote: |
In IIB9 is there anyway to validate against an XSD without having to create message set projects? |
Use the XSD directly _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sleepyjamie |
Posted: Mon Nov 16, 2015 9:50 am Post subject: |
|
|
Centurion
Joined: 29 Apr 2015 Posts: 135
|
Found a way to do this using your message model approach.
I had the XSD imported previously.
Used a Reset Content Descriptor node and specified the XSD to use. Funny thing is the tool doesn't show the XSD when browsing for a message model.
Thanks! |
|
Back to top |
|
 |
timber |
Posted: Tue Nov 17, 2015 1:08 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Quote: |
Funny thing is the tool doesn't show the XSD when browsing for a message model |
Correct - and I can understand why that might be confusing at first.
You probably think that a validating XML parser validates against an XSD. It doesn't, though. It validates against a collection of XSDs, known as a 'schema'. In IIB land we refer to a collection of XSDs as a 'model'.
In WMBv7, you used to put all of the XSDs into a message set. The message set was the 'model'. It was not one XSD - it was potentially many XSDs in a single container.
In WMBv8 and IIBv9 you simply add all of the XSDs to the Application ( either directly or via one or more Libraries ). The product collects them all up into a single model that is used for validatoin. That's why you don't have to specify the model any more.
( ...and in v10 you can have a shared library which is a named model, and you can specify that you want to validate against the XSDs in a specific shared library. Just like specifying a message set in WMBv7 ) |
|
Back to top |
|
 |
sleepyjamie |
Posted: Tue Nov 17, 2015 7:04 am Post subject: |
|
|
Centurion
Joined: 29 Apr 2015 Posts: 135
|
timber wrote: |
Quote: |
Funny thing is the tool doesn't show the XSD when browsing for a message model |
Correct - and I can understand why that might be confusing at first.
You probably think that a validating XML parser validates against an XSD. It doesn't, though. It validates against a collection of XSDs, known as a 'schema'. In IIB land we refer to a collection of XSDs as a 'model'.
In WMBv7, you used to put all of the XSDs into a message set. The message set was the 'model'. It was not one XSD - it was potentially many XSDs in a single container.
In WMBv8 and IIBv9 you simply add all of the XSDs to the Application ( either directly or via one or more Libraries ). The product collects them all up into a single model that is used for validatoin. That's why you don't have to specify the model any more.
( ...and in v10 you can have a shared library which is a named model, and you can specify that you want to validate against the XSDs in a specific shared library. Just like specifying a message set in WMBv7 ) |
Yeah that's probably why I was confused, thanks! Funny I took the IIB9 training and none of this was explained. |
|
Back to top |
|
 |
timber |
Posted: Tue Nov 17, 2015 8:09 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Well, there's a reason why MQSeries.net remains popular  |
|
Back to top |
|
 |
|