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 » How to learn more about message modeling in WMB

Post new topic  Reply to topic
 How to learn more about message modeling in WMB « View previous topic :: View next topic » 
Author Message
nize
PostPosted: Tue Sep 08, 2009 6:58 am    Post subject: How to learn more about message modeling in WMB Reply with quote

Voyager

Joined: 02 Sep 2009
Posts: 90

Do you have any tips on the subject how to learn more about message modeling in WMB? I am looking for info regarding the different entity types in the mxsd file and how they relate to each other as well as best practices modeling messages. For example it would be useful with a UML diagram showing how (local and global) elements, groups, (complex and simple) types and references relates to each other.

Then of course the namespace complexity makes yet another twist on it, but lets leave that out for the moment.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Sep 08, 2009 7:17 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

namespaces add no complexity. They add clarity.

They allow you to know that the Person element in this namespace is not the same as the Person element in that namespace, and that one has a CityStateZip child, and one has separate children for City, State, and Zip.
Back to top
View user's profile Send private message
nize
PostPosted: Tue Sep 08, 2009 10:31 am    Post subject: Reply with quote

Voyager

Joined: 02 Sep 2009
Posts: 90

mqjeff, you are right, namespaces are important, and in my opinion more or less easy to understand when it comes to logical structure, but when addressing them and keeping them in mind in practice (with denotations such as ':' and using/declaring prefixes) I believe they can complicate things. Still - you are right - their functionality is great.

However, what I wanted to raise with this topic was where to find/understand the rules when modeling messages. I am looking for a better understanding of the concepts or at least sources where I can build such.

Let me take some example questions (I believe I could go on and on):
a. Must a message* be created from a complex type, i.e. contain the attribute 'type'?
b. Which relations are allowed between two different complex types? I believe you can not create a structure such as the following?

Code:

<xsd:complexType name="t_msg">
    <xsd:sequence>
      <xsd:element name="submsg1" type="t_submsg">
      </xsd:element>
    </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="t_submsg">
    <xsd:sequence>
      <xsd:element name="blob" type="xsd:hexBinary">
      </xsd:element>
      <xsd:element name="blob2" type="xsd:hexBinary">
      </xsd:element>
    </xsd:sequence>
</xsd:complexType>


*) The definition of a message (i.e. what separates it from any xsd:element) I guess could be that it contains an xsd:annotation with the following element
Code:
<xsd:appinfo source="WMQI_APPINFO">
        <MRMessage messageDefinition="..."/>
      </xsd:appinfo>
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Sep 08, 2009 10:39 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Do not make any attempt to manipulate the mxsd file outside of the Message Definition Editor.

Why are you trying to do that?
Back to top
View user's profile Send private message
nize
PostPosted: Tue Sep 08, 2009 10:51 am    Post subject: Reply with quote

Voyager

Joined: 02 Sep 2009
Posts: 90

One reason for that could be that you what to use search and replace functions, for example assigning nillable="true" to all elements, but mostly I am referring to the text structure in order to make myself clearer. I believe there is a greater chance to understand each other when comparing code.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Sep 08, 2009 11:26 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The structure of the mxsd file is "internal" to the product.
Back to top
View user's profile Send private message
nize
PostPosted: Tue Sep 08, 2009 11:50 am    Post subject: Reply with quote

Voyager

Joined: 02 Sep 2009
Posts: 90

Ok, tomorrow I will try to express my example questions again without the use of code. I just tried to be explicit and clear .

And btw I think that this is an advantage of the WMB environment, that all components can be read in text - takes away the mystery that GUIs sometimes bring.
Back to top
View user's profile Send private message
nize
PostPosted: Wed Sep 09, 2009 1:18 am    Post subject: Reply with quote

Voyager

Joined: 02 Sep 2009
Posts: 90

Meanwhile maybe someone else have nice tips on useful resources on message modeling, helping you to learn in a "stringent" way?

Quote:
I am looking for info regarding the different entity types in the mxsd file and how they relate to each other as well as best practices modeling messages. For example it would be useful with a UML diagram showing how (local and global) elements, groups, (complex and simple) types and references relates to each other.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Sep 09, 2009 5:34 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Here's the thing.

An mxsd is JUST an XSD.

It's the same "model" - an MRM "element" has the same logical meaning as an XSD "element", it's the same syntax, it's the same everything.

It doesn't actually help you a significant amount in USING MRM nor in building models to know that.

There's a lovely tutorial that has been kindly "stickied" in this very forum, that you probably have passed over every time you have come to read these responses.

Oh, and, of course, there's an entire SECTION of the Information Center on Message Broker called "Developing Message Models" that tells you *everything* you want to know, including most of what you've already asked about.
Back to top
View user's profile Send private message
nize
PostPosted: Wed Sep 23, 2009 6:41 am    Post subject: Reply with quote

Voyager

Joined: 02 Sep 2009
Posts: 90

Thanks for your suggestions, mqjeff!

I dont think that the information center is very pedagogical when it comes to message models, e.g. explaining usual misunderstanding and giving best practices. That is why I hoped there were better resources.

I have seen a tutorial on this forum, but it was very specific for a specific task, which of course is great when performing that one. What I was searching for is general best practices when it comes to modeling messages.

I have been confused with questions such as when to define a group, a complex type, when to make the objects local/global, how the messages relates to the other objects and so on.

I guess I will think about these things again the next time I need to perform advanced message modeling.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Sep 23, 2009 7:18 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Hi there,

- No reason why your example XSD above should not be represented in a message definition file - it is legal XML schema.
- An MRM message must be based on a global complex element - so the mxsd resulting from the above schema would only be useful as an include/import.
- You can use almost any valid XSD structure in your message definition files. But don't use attributes unless you are modelling actual XML attributes. ( and if you are modelling an XML message, you should be targeting your message set at XMLNSC, not MRM ).
- Whether you use local or global type/elements is up to you - I prefer to use local definitions wherever possible, for the same reason that I make my Java methods/members 'private' wherever possible.

For any other questions, I suggest that you exploit the combined brain power of this forum to crowd-source a solution. Parsing is an inherently complex business. Even if the infocenter was excellent, I suspect that a lot of help would still be required when modelling a complex non-XML message.
Back to top
View user's profile Send private message
nize
PostPosted: Wed Sep 23, 2009 10:32 pm    Post subject: Reply with quote

Voyager

Joined: 02 Sep 2009
Posts: 90

Thanks for your comments, kimbert!

Quote:
if you are modelling an XML message, you should be targeting your message set at XMLNSC, not MRM


If I want to validate a XML message I need to use the MRM parser. Am I not right? Anyway I believe this was the case for WMB5. Maybe it has changed in WMB6.1 so that you can provide the message flow with a XSD and validate your incoming (or outgoing) messages using that one?
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Sep 23, 2009 11:09 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

From v6.1 onwards, XMLNSC supports schema validation ( and a lot more besides ).
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ad21074_.htm
Back to top
View user's profile Send private message
nize
PostPosted: Thu Sep 24, 2009 12:22 am    Post subject: Reply with quote

Voyager

Joined: 02 Sep 2009
Posts: 90

nice
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 » How to learn more about message modeling in WMB
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.