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 » XMLNSC output message attributes becomes elements

Post new topic  Reply to topic
 XMLNSC output message attributes becomes elements « View previous topic :: View next topic » 
Author Message
pcelari
PostPosted: Tue Nov 08, 2011 10:25 am    Post subject: XMLNSC output message attributes becomes elements Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

Hello. I'm experiencing strange behavior in output message in XMLNSC domain.

I defined the output message with a correct xsd file, which specifies a few attributes and others element. The input msg is of similar header containing same-named attributes.

However, unless I do a field-by-field copy of all attributes first and then modify them, the attributes in output become elements.

I wonder what is at play in the behavior.

Can our experts here shed some light on this?

thanks a lot!


_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Nov 08, 2011 11:08 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.

Would you care to share a sample of the ESQL you have used with us?
_________________
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
pcelari
PostPosted: Tue Nov 08, 2011 11:20 am    Post subject: Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

set OutputRoot.XMLNSC.ns1:Message.MessageId = InputBody.ns:Message.MessageId;
set OutputRoot.XMLNSC.ns1:Message.MessageType = InputBody.ns:Message.MessageType;
set OutputRoot.XMLNSC.ns1:Message.ObjectFormat = InputBody.ns:Message.ObjectFormat;


-- unless I add the following line, the ObjectName will become an element instead of attribte.
set OutputRoot.XMLNSC.ns1:Message.ObjectName = InputBody.ns:Message.ObjectName;

-- This is the ultimate assignment, overriding the last line. But by itself, without the above line, it becomes an element.
set OutputRoot.XMLNSC.ns1:Message.ObjectName = 'Accessory IO';
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Nov 08, 2011 11:27 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Either add in (XMLNSC.Attribute) or use Create Field.

Your code doesn't supply any context for the field type to determine that it should be anything other than an element.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Nov 08, 2011 12:11 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/topic/com.ibm.etools.mft.doc/ac76040_.htm

The key point is that the *only* input used by XMLNSC when it is writing the output XML is...the message tree. The schemas can be used for validating, but they do not control what is output.
Back to top
View user's profile Send private message
pcelari
PostPosted: Wed Nov 09, 2011 5:30 am    Post subject: Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

Wow, thanks so much for pointing that out.

Although I have been with WMB for quite a few years, this is the first time I have to deal with attribute.

Again, thanks for caring to respond to such a typical "newbie" question.


_________________
pcelari
-----------------------------------------
- a master of always being a newbie
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 » XMLNSC output message attributes becomes elements
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.