|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Validating XML against messageset with many mxsds |
« View previous topic :: View next topic » |
Author |
Message
|
jb3 |
Posted: Wed Oct 04, 2017 4:27 am Post subject: Validating XML against messageset with many mxsds |
|
|
Apprentice
Joined: 18 Aug 2017 Posts: 26
|
Hi,
I have been provided a jar of xsds. The IIB generated xmls need to be validated against these, before sending them to destination.
The jar has following structure:
Code: |
jar
CONTROL
xsdControl1
xsdControl2
...
xsdControl6
SERVICES
COMMON
xsdCommon
CUSTOM
xsdCustom
MESSAGES
xsdMsg1
xsdMsg2
...
xsdMsg441
xsdServices1
xsdServices2
...
xsdServices372
|
The xsd Services includes and imports other xsds from other folders which in turn includes more xsds.
The nesting goes down to 15 levels, and the resulting xsd has approximately 500 elements. (I only need to map about 50)
When i create the messageSet using this xsdService, i need to import the other referenced ones too.
This results in many MXSDs.
I am then generating an XML and for validation, using the Validation Node and specifying the messageSet number.
Questions:
Using the above approach, the validation fails. So I am wondering if is it even possible to validate an XML against messageset with many MXSDs?
Should i be requesting a flattened schema from other application team?
Is there any other better approach?
Many Thanks |
|
Back to top |
|
 |
timber |
Posted: Wed Oct 04, 2017 5:12 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Please quote the error message that you get when the validation fails.
I assume you realise that the Validation node is rarely required. If the validation is performed at the start or the end of the message flow, you can trigger validation using the properties on the input or Compute/Mapping node.
This is nothing to do with nesting or multiple XSDs, btw. The dictionary generator flattens everything into a single file in the BAR file. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Oct 04, 2017 6:13 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You don't specify your IIB version,... but shouldn't you be using XMLNSC and message models instead of MRM and message sets?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
timber |
Posted: Wed Oct 04, 2017 7:18 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
@fjb_saper: I almost asked exactly the same question. But it's just possible that the OP is using WMB v8 or IIB v9, neither of which support shared libraries. In those versions, a message set is a nearest thing to a shared library that you can get.
If they are using MRM, the error message will reveal that. |
|
Back to top |
|
 |
jb3 |
Posted: Wed Oct 04, 2017 7:26 am Post subject: |
|
|
Apprentice
Joined: 18 Aug 2017 Posts: 26
|
Thanks timber and fjb_saper for your replies.
I am working on IIB9. I will post the error details tomorrow.
In the interim, could you please help me understand below
Quote: |
But it's just possible that the OP is using WMB v8 or IIB v9, neither of which support shared libraries. In those versions, a message set is a nearest thing to a shared library that you can get. |
thanks |
|
Back to top |
|
 |
timber |
Posted: Thu Oct 05, 2017 2:57 pm Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
When you use a message set, you have to specify *which* message set you want to validate against. This is true whether you use MRM (yuk!) or XMLNSC (yay!) to parse and validate your XML. You have to specify the message set, because each message set is an independent, self-contained model.
In WMB v8 and IIB v9, you don't have to put your schemas into a message set. You can either add them directly to your Application, or you can choose to put them into a Library. Either way, they get deployed automatically along with the Application. You don't have to specify the Library name because all schemas are added into a single model that is automatically available throughout the Application.
For small models, there's not much difference between the two approaches. Best practice is to put the schemas into a Library because that's the strategic direction of the IIB product.
The only reason to use a message set in WMBv8/IIBv9 is to deploy two or more separate models into the same Application. IIBv10 can do that via a shared Library. And yes, in IIBv10 you can specify the Library name if you want to validate against a specific model.
Hope that helps. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|