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 » multipart message with unbounded occurance

Post new topic  Reply to topic Goto page 1, 2  Next
 multipart message with unbounded occurance « View previous topic :: View next topic » 
Author Message
angka
PostPosted: Thu Jul 22, 2010 10:49 pm    Post subject: multipart message with unbounded occurance Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

I have encountered some problems while working with the Message Set for multipart messages. I am using the Message Identity to identity the multipart message.

This works correctly when the embedded message has only one occurrence. Currently, the problem lies when there is more than one occurrence of the embedded message.

The incoming message is in TDS physical format and the input node parse it to MRM logical format. There is no problem with the MRM tree. Then I use the compute node to change the message physical format to XML and this is where the error occurs. Below is the error generated.


Thank you.


ExceptionList
RecoverableException
File:CHARACTER:F:\build\S000_P\src\DataFlowEngine\ImbDataFlowNode.cpp
Line:INTEGER:1073
Function:CHARACTER:ImbDataFlowNode::createExceptionList
Type:CHARACTER:ComIbmFileInputNode
Name:CHARACTER:test1#FCMComposite_1_1
Label:CHARACTER:test1.FileInput
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Node throwing exception
RecoverableException
File:CHARACTER:F:\build\S000_P\src\DataFlowEngine\ImbMqOutputNode.cpp
Line:INTEGER:899
Function:CHARACTER:ImbMqOutputNode::evaluate
Type:CHARACTER:ComIbmMQOutputNode
Name:CHARACTER:test1#FCMComposite_1_2
Label:CHARACTER:test1.MQOutput
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Caught exception and rethrowing
ParserException
File:CHARACTER:F:\build\S000_P\src\MTI\MTIforBroker\MtiImbParser2\MtiImbParser.cpp
Line:INTEGER:1872
Function:CHARACTER:MtiImbParser::refreshBitStreamFromElements - 9 par
Type:CHARACTER:ComIbmFileInputNode
Name:CHARACTER:test1#FCMComposite_1_1
Label:CHARACTER:test1.FileInput
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:5286
Text:CHARACTER:ImbRecoverableException caught from worker when attempting to write out the bitstream.
Insert
Type:INTEGER:5
Text:CHARACTER:MyTest2
Insert
Type:INTEGER:2
Text:CHARACTER:1
Insert
Type:INTEGER:5
Text:CHARACTER:XML1
Insert
Type:INTEGER:5
Text:CHARACTER:/Message_1
ParserException
File:CHARACTER:F:\build\S000_P\src\MTI\MTIforBroker\MtiImbParser2\MtiImbDictionaryIterator.cpp
Line:INTEGER:206
Function:CHARACTER:MtiImbDictionaryIterator::syncWithNextSibling
Type:CHARACTER:ComIbmFileInputNode
Name:CHARACTER:test1#FCMComposite_1_1
Label:CHARACTER:test1.FileInput
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:5339
Text:CHARACTER:move to next sibling failed.
Insert
Type:INTEGER:5
Text:CHARACTER:moveToNextSiblingTagName
Insert
Type:INTEGER:5
Text:CHARACTER:MyTest2 (P5BHERS002001)
Insert
Type:INTEGER:5
Text:CHARACTER:Body1
Back to top
View user's profile Send private message
sourdas2
PostPosted: Thu Jul 22, 2010 11:53 pm    Post subject: Reply with quote

Voyager

Joined: 21 Apr 2006
Posts: 90
Location: Kolkata,India

Please provide the logical structure of the TDS Message set
_________________
Thanks and Warm Regards
Sourav
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kimbert
PostPosted: Fri Jul 23, 2010 12:25 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Tip: Before writing the message, the MRM parser needs to match two things:
- the logical structure in the message definition
- the logical message tree
It writes user trace messages during the matching process. If you take a debug-level user trace, you will probably see where it is tripping up.

If you can't get MRM XML to work then I recommend that you use a different parser for writing the XML. Best practice is to use MRM for non-XML data, and XMLNSC for all XML data. As a bonus, XMLNSC will use a lot less CPU than MRM XML.
Back to top
View user's profile Send private message
angka
PostPosted: Fri Jul 23, 2010 12:45 am    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

I will get and paste the TDS message definition later. I am using MRM parser because the incoming message is in TDS format. I can't use XMLNSC as the parser.

there is no exception when parsing the incoming TDS format message to MRM domain.

Btw does WMB support multipart message with unbounded complex type?

Thank you.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jul 23, 2010 1:14 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I am using MRM parser because the incoming message is in TDS format. I can't use XMLNSC as the parser.
That's true, but you have misunderstood what I am saying.
You can use the MRM TDS parser to parse the incoming message, and the XMLNSC parser to write the XML. It will probably work better and faster than MRM XML.
Back to top
View user's profile Send private message
angka
PostPosted: Sun Jul 25, 2010 10:59 pm    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

How do I parse the logical format from MRM(TDS) to XMLNSC? I need to parse it to XML physical format before i can use XMLNSC right?

Below is the xsd.

MAIN
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:include schemaLocation="body.xsd"/>
<xsd:complexType name="type_Message">
<xsd:sequence>
<xsd:element name="head" type="type_header"/>
<xsd:element maxOccurs="unbounded" name="body" type="type_body"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="Message_1" type="type_Message">
</xsd:element>
</xsd:schema>

Body
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:include schemaLocation="payload.xsd"/>
<xsd:complexType name="type_header">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="id" type="xsd:string">
</xsd:element>
<xsd:element name="time" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="type_body">
<xsd:choice maxOccurs="1" minOccurs="1">
<xsd:choice maxOccurs="unbounded">
</xsd:choice>
</xsd:choice>
</xsd:complexType>
</xsd:schema>

Payload
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="type_int_body1">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="desc" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="type_int_body2">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="desc" type="xsd:string"/>
<xsd:element name="age" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="Body1" type="type_int_body1">
</xsd:element>
<xsd:element name="Body2" type="type_int_body2">
</xsd:element>
</xsd:schema>

Any idea what went wrong? Thanks
Back to top
View user's profile Send private message
flahunter
PostPosted: Sun Jul 25, 2010 11:33 pm    Post subject: Reply with quote

Acolyte

Joined: 30 Oct 2008
Posts: 62

Quote:
<xsd:complexType name="type_body">
<xsd:choice maxOccurs="1" minOccurs="1">
<xsd:choice maxOccurs="unbounded">
</xsd:choice>
</xsd:choice>
</xsd:complexType>


What does it mean? Is it correct?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Sun Jul 25, 2010 11:47 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

angka wrote:
Hi,

How do I parse the logical format from MRM(TDS) to XMLNSC? I need to parse it to XML physical format before i can use XMLNSC right?



Create another Message Set using the XSD that does not use the MRM Parser but the XMLNSC one.
Then once the incoming message has been parsed by the MRM parser you can then pass it through a RCD node to assign the new message Set etc to the message data.
Then when the message pops out the end of the flow, it will be output with the XMLNSC parser.

You could also do the reassignement in ESQL if you prefer.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jul 26, 2010 12:39 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
How do I parse the logical format from MRM(TDS) to XMLNSC?
You cannot 'parse' a logical format, but I think I know what you mean. You want to make your message flow use XMLNSC instead of MRM, right? The answer is simple - build the output under OutputRoot.XMLNSC, instead of OutputRoot.MRM. You may need to change the ESQL that creates your output tree because XMLNSC requires you to identify which fields are attributes ( by setting the field type ). There may be other changes required, depending on how complex your message model is.

Quote:
I need to parse it to XML physical format before i can use XMLNSC right?
No - there is no need for this step. If you use XMLNSC you *could* delete the XML physical format from your message set. In all currently-released versions, XMLNSC completely ignores the XML physical format in the message set.

smdavies99 said:
Quote:
Create another Message Set using the XSD that does not use the MRM Parser but the XMLNSC one.
This step is optional. With XMLNSC you do not need a message set unless you want to perform schema validation of your message ( i.e. validation is set to 'Content and Value' ). I normally recommend using a message set always, in order to get content assist/Mapping node support in the toolkit.

Quote:
Then once the incoming message has been parsed by the MRM parser you can then pass it through a RCD node to assign the new message Set etc to the message data. Then when the message pops out the end of the flow, it will be output with the XMLNSC parser.
I'm not sure that this will work in this case. Conceptually, an RCD node serializes the message and then re-parses it. In this case, the reserialization will reproduce the original non-XML bitstream, and the XMLNSC parser will not be able to interpret it. To get around that problem, angka would need to change the MRM physical format to 'XML1', but that would be a horrendous waste of CPU, and would only move his original problem from the output node to the RCD node.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Jul 26, 2010 1:03 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

kimbert wrote:
I'm not sure that this will work in this case. Conceptually, an RCD node serializes the message and then re-parses it. In this case, the reserialization will reproduce the original non-XML bitstream, and the XMLNSC parser will not be able to interpret it. To get around that problem, angka would need to change the MRM physical format to 'XML1', but that would be a horrendous waste of CPU, and would only move his original problem from the output node to the RCD node.


Well, that is something new.
I'd always understood that the RCD node just changed the placeholders (in the properties folder) & then collapses any parsed branches so that the 'parse on demand' model would start again with nothing parsed.

This meant that if you were not messing with the model then no parsing would take place until the output node.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jul 26, 2010 1:20 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You're right - that's why I used the word 'conceptually'. The parsing might not happen immediately, but the message flow behaves in almost every respect as though it did happen immediately. Hence my point about XMLNSC trying to parse non-XML data.
Back to top
View user's profile Send private message
angka
PostPosted: Mon Jul 26, 2010 2:36 am    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

Quote:
What does it mean? Is it correct?


Sorry, paste wrongly. should be this.

Body
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:include schemaLocation="payload.xsd"/>
<xsd:complexType name="type_header">
<xsd:sequence>
<xsd:element name="id" type="xsd:string">
</xsd:element>
<xsd:element name="time" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="type_body">
<xsd:sequence>
<xsd:choice maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>





Quote:
The answer is simple - build the output under OutputRoot.XMLNSC, instead of OutputRoot.MRM. You may need to change the ESQL that creates your output tree because XMLNSC requires you to identify which fields are attributes ( by setting the field type ).


Do you mean this?
SET OutputRoot.XMLNSC = InputRoot.MRM;

I tested it works but what is wrong with my message definition?


Quote:
If you use XMLNSC you *could* delete the XML physical format from your message set.


Ya you will only need it if you wanna validate.

Thanks.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jul 26, 2010 2:54 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

angka wrote:
Do you mean this?
SET OutputRoot.XMLNSC = InputRoot.MRM;

That won't work.

You must map each field individually.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jul 26, 2010 3:07 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Sorry, paste wrongly. should be this.
You still didn't get it 100% correct. When posting XML, xsd or code you should enclose it in [code] tags to preserve the indentation.

Quote:
Do you mean this?
SET OutputRoot.XMLNSC = InputRoot.MRM;
Well, this would be better:
SET OutputRoot.XMLNSC.rootTag = InputRoot.MRM;
Obviously, you can change 'rootTag' to the name of your real root tag. You may be able to pick that out of InputRoot.Properties.MessageType.
Quote:
I tested it works but what is wrong with my message definition?
Not sure why you're asking the question. Who said there was anything wrong with it?

angka said:
Quote:
Ya you will only need it ( the XML physical format ) if you wanna validate.
No - that is not correct. The facts are:
- The MRM parser requires a message set AND a physical format, or else it cannot parse or write anything.
- The XMLNSC parser does not require a message set unless the 'Validation' property is set to 'Content and Value'.
- The XMLNSC parser does not use the XML physical format in a message set. It only uses the pure XML schema information in the mxsd files.
Got that?
Back to top
View user's profile Send private message
angka
PostPosted: Mon Jul 26, 2010 10:21 pm    Post subject: Reply with quote

Chevalier

Joined: 20 Sep 2005
Posts: 406

Hi,

Quote:
No - that is not correct. The facts are:
- The MRM parser requires a message set AND a physical format, or else it cannot parse or write anything.
- The XMLNSC parser does not require a message set unless the 'Validation' property is set to 'Content and Value'.
- The XMLNSC parser does not use the XML physical format in a message set. It only uses the pure XML schema information in the mxsd files.


Ya sorry. all physical format is for MRM parser.

Quote:
Well, this would be better:
SET OutputRoot.XMLNSC.rootTag = InputRoot.MRM;


Quote:
That won't work.

You must map each field individually.


Ya forget to type in the rootTag. the xml generated is a simple XML so there is no need to map each field individually

Quote:
Not sure why you're asking the question. Who said there was anything wrong with it?


but why when i set the messageformat to physical format 'XML1', the MRM parser fail to parse correctly and write the XML output to queue?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » multipart message with unbounded occurance
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.