ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Validating XML against messageset with many mxsds

Post new topic  Reply to topic
 Validating XML against messageset with many mxsds « View previous topic :: View next topic » 
Author Message
jb3
PostPosted: Wed Oct 04, 2017 4:27 am    Post subject: Validating XML against messageset with many mxsds Reply with quote

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
View user's profile Send private message
timber
PostPosted: Wed Oct 04, 2017 5:12 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

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
View user's profile Send private message
fjb_saper
PostPosted: Wed Oct 04, 2017 6:13 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
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
View user's profile Send private message Send e-mail
timber
PostPosted: Wed Oct 04, 2017 7:18 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

@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
View user's profile Send private message
jb3
PostPosted: Wed Oct 04, 2017 7:26 am    Post subject: Reply with quote

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
View user's profile Send private message
timber
PostPosted: Thu Oct 05, 2017 2:57 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Validating XML against messageset with many mxsds
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.