Author |
Message
|
southpaw |
Posted: Wed Jul 05, 2006 1:27 am Post subject: Multipart messages |
|
|
Newbie
Joined: 04 Jul 2006 Posts: 6
|
Hello,
I'm currently experimenting with multipart messages within the broker. I want to create this construction using CWF and/ or XML Wire format. I've read some documentation(broker help topics) about this but I would like to know more...
Is there a supportpac with a demo of multipart messages in messagesets using CWF and/ or XML wire format? Is there any other(more detailed) information about this?(I coulnd't find any redbooks or anything!?)
Any hints to get me in the right direction will be greatly appreciated...!
Grtz and TIA,
Bas |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 05, 2006 1:37 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Is there a supportpac with a demo of multipart messages in messagesets using CWF and/ or XML wire format? |
I don't think so.
Quote: |
I want to create this construction using CWF and/ or XML Wire format. |
Tip: You cannot mix XML and CWF within the same multi-part message. Apologies if you knew that already.
Quote: |
Any hints to get me in the right direction will be greatly appreciated...! |
You'll need to tell us your requirements first. What do your messages look like? Is there a 'message key' field in the header which identifies the message type of the body? |
|
Back to top |
|
 |
southpaw |
Posted: Wed Jul 05, 2006 2:39 am Post subject: |
|
|
Newbie
Joined: 04 Jul 2006 Posts: 6
|
Hi,
Quote: |
Quote:
I want to create this construction using CWF and/ or XML Wire format.
Tip: You cannot mix XML and CWF within the same multi-part message. Apologies if you knew that already. |
I already knew this (because it was in the helpfile)
Anyway...
This might be a bit of a long story but here we go:
My requirements:
1. I want to sent an xml message from a to b. The message will be
validated against a definition in a messageset using the MRM parser
and XML wire format. (basic stuff)
2. I want to sent an xml message from a to b with transformation from
xml to flatfile(just a long string basically) The message will be
validated against a definition in a messageset using the MRM parser
and CWF.(also basic stuff)
To create the messageset definitions I import xsd's into mxsd's.
The xml messages look like this:(only the structure is similar)
<envelop>
<header>
<element>header</element>
</header>
<body>
<element1>a</element1>
<element2>b</element2>
</body>
</envelop>
The flatfile messages (can) look like this:
headerab
In red is the variable part(inner message) I know there are different ways to create multipart messages for xml wire format and CWF and that you have to create a comlextype(or group) with the composition set to 'message'. At this place in the message there can be different innermessages as I understand it.
I don't know how to reference that innerpart of the messages(I believe ESQL). I also haven't got a clue as to how the messages will be validated correctly in the runtime(get referenced, that is)
Do you understand my proble, and can you help me??
TIA and Grtz,
Bas. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 05, 2006 4:21 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Thanks - that's useful information. I've still got a couple more questions, though.
1. Which version are you using ( hopefully v6 ).
2. Is there anything in the header section which identifies the inner message?
3. If the answer to 2. is 'No' them how do other applications identify/parse the inner CWF message? |
|
Back to top |
|
 |
southpaw |
Posted: Wed Jul 05, 2006 4:50 am Post subject: |
|
|
Newbie
Joined: 04 Jul 2006 Posts: 6
|
Hello kimbert,
1. Which version are you using ( hopefully v6 ). I'm currently running on broker v5.0.4. Next year maybe v6
2. Is there anything in the header section which identifies the inner message? Yes there is, we use the values in the messages for content based routing. Via this value of an element in the header section, the body section could be identified.
3. If the answer to 2. is 'No' them how do other applications identify/parse the inner CWF message? At the moment they do not identify the innermessage because we're not using multipart messages at the moment.
Thanx a lot for your help so far, this really gets my spirits up!
Grtz,
Bas. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jul 05, 2006 5:50 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Let's split this into two problems
1. How to ensure that the XML validation works correctly
2. How to correctly serialize the CWF output message
Problem 1. cannot be solved using multipart messages in v5 ( because in v5 message keys can only be used with the MRM TDS physical format ). No problem, though. Model it like this:
Code: |
Envelope
Header
...
Body [Composition=choice Content Validation=Open Defined]
...
|
Ensure that for each possible message body there is a global element in your message model ( that's probably the case anyway ).
I think Problem 2. will solve itself once you get problem 1. sorted (I'm assuming that your CWF message set has the same logical structure as your XML message set).
I do advise you to treat these two problems separately, and test them individually, although both may require the same solution. |
|
Back to top |
|
 |
|