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 » Setting xml attributes in MRM domain

Post new topic  Reply to topic
 Setting xml attributes in MRM domain « View previous topic :: View next topic » 
Author Message
MSV
PostPosted: Thu May 24, 2007 7:53 am    Post subject: Setting xml attributes in MRM domain Reply with quote

Acolyte

Joined: 11 Apr 2006
Posts: 59

Hello,

I am trying the following code in MB Version 5.

Code:
SET OutputRoot.MRM.(XML.XmlDecl) = '';
SET OutputRoot.MRM.(XML.XmlDecl).(XML."Version") = '1.0';
SET OutputRoot.MRM.(XML.XmlDecl).(XML."Encoding") = 'UTF-8';

Getting a ParserException BIP5502E: An Common Parser Interface internal error occurred: Diagnostic information: Empty tag name when creating a SearchDef object.


After going thru few related topics in the forum, suggested solution i found for this issue is a 3 step process
1)RCD to parse to xml ,
2)Add attributes in a compute,
3)RCD to parse back to MRM

But, I cant increase the number of nodes in my message flow

Is there any other alternative for resolving this issue ?
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu May 24, 2007 5:07 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You cannot use (XML.XmlDecl) or indeed (XML.anything) with the MRM domain. The MRM parser is controlled by the contents of the message set, not by the Type field in the message tree.
In v5, you cannot change the contents of the XML declaration which the MRM parser outputs - there are no properties in the message set for that. So you have two choices:
a) Forget about using MRM for output. Use the XMLNS domain instead.
b) Do what you described in your post.

I would go for a).
Back to top
View user's profile Send private message
simon.starkie
PostPosted: Wed Jan 27, 2010 6:28 am    Post subject: Reply with quote

Disciple

Joined: 24 Mar 2002
Posts: 180

kimbert wrote:
You cannot use (XML.XmlDecl) or indeed (XML.anything) with the MRM domain. The MRM parser is controlled by the contents of the message set, not by the Type field in the message tree.
In v5, you cannot change the contents of the XML declaration which the MRM parser outputs - there are no properties in the message set for that. So you have two choices:
a) Forget about using MRM for output. Use the XMLNS domain instead.
b) Do what you described in your post.

I would go for a).


Thanks, I wish I'd seen this earlier.
It's exactly the same problem I had.
I happened to switch from MRM to XMLNSC.
And then later found the above ESQL from another source.
Worked like a charm.

The reason why I needed the XML DECL in the output XML is because the product I am interfacing with, the GAL component our Perficient logging product, requires the XML DECL otherwise it considers the message to be a BLOB (yeah, not the best way of determining XML, especially since the XML DECL is optional anyway).

I was really stumped with MRM but switched to XMLNSC and then found the above ESQL from someone else and it worked like a charm.

I would like to have kept MRM for reasons of consistency (a shop standard to always use MRM instead of the other parsers, especially not XML if it can be avoided).

Any chance IBM could perhaps consider making the coding of the XML DECL available for MRM?

Another possibility would be an enhancement to the the Message Set implementation such that the generation of the XML DECL could be specified there and so avoid the need to code the above ESQL?

Thanks.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jan 27, 2010 7:00 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I would like to have kept MRM for reasons of consistency (a shop standard to always use MRM instead of the other parsers, especially not XML if it can be avoided).
The rule should be 'MRM for non-XML formats, XMLNSC for XML'.
Quote:
Any chance IBM could perhaps consider making the coding of the XML DECL available for MRM?
Yes. But the chance of it happening is ~0% Seriously, MRM XML is no longer being enhanced. XMLNSC is the strategic XML parser.
Quote:
Another possibility would be an enhancement to the the Message Set implementation such that the generation of the XML DECL could be specified there and so avoid the need to code the above ESQL?
If that was ever done, the new info in the message set would be used by XMLNSC, not by MRM XML. Don't interpret that as anything other than what it is - a discussion of possibilities.
Back to top
View user's profile Send private message
simon.starkie
PostPosted: Wed Jan 27, 2010 9:01 am    Post subject: Reply with quote

Disciple

Joined: 24 Mar 2002
Posts: 180

kimbert wrote:
Quote:
I would like to have kept MRM for reasons of consistency (a shop standard to always use MRM instead of the other parsers, especially not XML if it can be avoided).
The rule should be 'MRM for non-XML formats, XMLNSC for XML'.
Quote:
Any chance IBM could perhaps consider making the coding of the XML DECL available for MRM?
Yes. But the chance of it happening is ~0% Seriously, MRM XML is no longer being enhanced. XMLNSC is the strategic XML parser.
Quote:
Another possibility would be an enhancement to the the Message Set implementation such that the generation of the XML DECL could be specified there and so avoid the need to code the above ESQL?
If that was ever done, the new info in the message set would be used by XMLNSC, not by MRM XML. Don't interpret that as anything other than what it is - a discussion of possibilities.


Thank you so much for answering our questions and providing us with some very good guidance.
We've had an on-going debate here about which parser to use, some like MRM or others like myself prefer XMLNSC.
Your valuable comments makes it alot easier to define a best practice shop standard to use XMLNSC in preference over MRM and certainly over XML.

Thanks and Cheers!
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jan 27, 2010 10:55 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Don't know about 5.0, but in 6.0 the xml setup of the message set allows you to specify the output or suppression of the xml declaration...

Look to the XML specific settings in the message set. Apart from that as Kimbert said, you're better off with XMLNSC...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
simon.starkie
PostPosted: Wed Jan 27, 2010 5:52 pm    Post subject: Reply with quote

Disciple

Joined: 24 Mar 2002
Posts: 180

fjb_saper wrote:
Don't know about 5.0, but in 6.0 the xml setup of the message set allows you to specify the output or suppression of the xml declaration...

Look to the XML specific settings in the message set. Apart from that as Kimbert said, you're better off with XMLNSC...


Yes, I had looked at the "XML Declaration" in the "XML Wire Formats" > "XML1" tag but all the default options seemed correct for generating the XML DECL I wanted, for example the "Supress XML Declaration" box unchecked, XML Version was 1.0, XML Encoding was "As document text" and "Standalone Document wasset to "Yes".

So the ESQL above achieved the desired result but only with XMLNSC as Kimbert mentioned. It's interesting to see MRM fade a bit considering it was the flagship in 1999, but as Kimbert said, MRM is good for other non-XML things.

Thanks.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jan 28, 2010 12:35 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
It's interesting to see MRM fade a bit considering it was the flagship in 1999
I've faded a bit in the last 11 years myself. I might even have been the 'strategic choice' back then. Must ask my wife about this...
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 » Setting xml attributes in MRM domain
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.