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 » Attributes rendered as elements with MRM (XML wire format)

Post new topic  Reply to topic
 Attributes rendered as elements with MRM (XML wire format) « View previous topic :: View next topic » 
Author Message
gilbert
PostPosted: Wed May 14, 2008 4:03 am    Post subject: Attributes rendered as elements with MRM (XML wire format) Reply with quote

Novice

Joined: 31 Oct 2006
Posts: 14

Hi

What i would like to achieve in Output XML is something like this:
<m:Data>
<crm:Body>
<ms:Element1 name="male">0</ms:Element>
<ms:Element2 name="en">4</ms:Element>
<ms:Element3 name="H" />
....
</crm:Body>
</m:Data>

ESQL looks like this:
SET OutputRoot.MRM[1].m:Data.crm:Body.ms:element1 = 0;
SET OutputRoot.MRM[1].m:Data.crm:Body.ms:element1.name = 'male';
SET OutputRoot.MRM[1].m:Data.crm:Body.ms:element2 = 4;
SET OutputRoot.MRM[1].m:Data.crm:Body.ms:element2.name = 'EN';
SET OutputRoot.MRM[1].m:Data.crm:Body.ms:element3.name = 'H';

But instead I'm gettin this:
<m:Data>
<crm:Body>
<ms:Element1 name="male">0</ms:Element>
<ms:Element2>
4
<name>EN</name>
</ms:Element>
<ms:Element3>
<name>H</name>
</ms:Element>
....
</crm:Body>
</m:Data>

All of the ms:Element[n] are of the same type which defines the attribute "name". Strangest think is that few of the <ms:Element> nodes are rendered correctly as XML but the rest aren't. And they all are of the same type.
I found few similar cases in the forums but not the solution. I'm using MB6.1.


Thanks in advance
Back to top
View user's profile Send private message
Gemz
PostPosted: Wed May 14, 2008 4:54 am    Post subject: Reply with quote

Centurion

Joined: 14 Jan 2008
Posts: 124

Quote:
ESQL looks like this:
SET OutputRoot.MRM[1].m:Data.crm:Body.ms:element1 = 0;
SET OutputRoot.MRM[1].m:Data.crm:Body.ms:element1.name = 'male';
SET OutputRoot.MRM[1].m:Data.crm:Body.ms:element2 = 4;
SET OutputRoot.MRM[1].m:Data.crm:Body.ms:element2.name = 'EN';
SET OutputRoot.MRM[1].m:Data.crm:Body.ms:element3.name = 'H';



Use (XML.Attribute) in the set statement

SET OutputRoot.MRM[1].m:Data.crm:Body.ms:element1 = 0;
SET OutputRoot.MRM[1].m:Data.crm:Body.ms:element1(XML.Attribute).name = 'male';
SET OutputRoot.MRM[1].m:Data.crm:Body.ms:element2 = 4;
SET OutputRoot.MRM[1].m:Data.crm:Body.ms:element2.(XML.Attribute)name = 'EN';
SET OutputRoot.MRM[1].m:Data.crm:Body.ms:element3.(XML.Attribute)name = 'H';
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed May 14, 2008 4:57 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Gemz wrote:
Use (XML.Attribute) in the set statement


No. Do not use XML domain constants with the MRM parser.

Never ever ever do this.

In fact, please don't use the XML domain for anything.

Adjust the physical properties of the message model to correctly render these fields.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed May 14, 2008 5:03 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Gemz wrote:
Use (XML.Attribute) in the set statement


Those kind of constants are incompatable with message sets (MRM domain)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed May 14, 2008 10:29 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Strangest think is that few of the <ms:Element> nodes are rendered correctly as XML but the rest aren't
Have you taken a user trace yet? If not, then I suggest you do that next.
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 » Attributes rendered as elements with MRM (XML wire format)
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.