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 » where to set default value to xml msg element?

Post new topic  Reply to topic
 where to set default value to xml msg element? « View previous topic :: View next topic » 
Author Message
pcelari
PostPosted: Mon Jan 29, 2007 1:09 pm    Post subject: where to set default value to xml msg element? Reply with quote

Chevalier

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

I want to assign certain fields of my xml msg to default value, like company name, etc. instead of assigning them all in compute node.

However, unlike TDS format, I couldn't find a place to do this in the msg definition pane for a xml msg.

Also, why do I have to set the value of the Xml element. Why can't I just leave them empty?

Am I missing sth?

currently, I got the exception when the msg reaches MQOutput node: "manditory element has no value or default value assigned".

thanks for any insight.
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jan 29, 2007 1:20 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Default values are only applied when writing a fixed-length bitstream (i.e. a bitstream in which there are no delimiters ). In practice, that means that default values will be used when writing an MRM CWF or Fixed Length MRM TDS message. Default values are never automatically inserted when parsing, and cannot be used to populate a message tree.
Sorry to bring bad news
Back to top
View user's profile Send private message
pcelari
PostPosted: Mon Jan 29, 2007 1:52 pm    Post subject: Reply with quote

Chevalier

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

thanks a lot for clarifying this.

So it means I'll have to set all elements in my ESQL code even they are empty? Or is there a way around this?
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jan 29, 2007 1:55 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can create a static message that has default values populated, then you can use CREATE FIELD... PARSE... to turn this into a message tree.

Then you can update necessary fields from Input message.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
pcelari
PostPosted: Mon Jan 29, 2007 2:05 pm    Post subject: Reply with quote

Chevalier

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

jefflowrey wrote:
You can create a static message that has default values populated, then you can use CREATE FIELD... PARSE... to turn this into a message tree.

Then you can update necessary fields from Input message.


that's what I did in my C program, where the static msg is in a file. But how can I read a static file from a compute node?

thanks a lot.
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Jan 29, 2007 2:06 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can't read a static file from a Compute node.

You can read a static file from a JavaCompute node.

You can also store the static data in a single User Defined Property, or in a database table.

Or you can hardcode it.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
pcelari
PostPosted: Mon Jan 29, 2007 2:43 pm    Post subject: Reply with quote

Chevalier

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

thanks for pointing out all these options. I've got to find and read about them all in the manual. I still wonder if I can simply copy and paste a file containing the xml tree as a string into, say LocalEnvironment.Variables.

In the mean time, I think I better use a mapping node instead, where I can set the target values.

many thanks G.M.!
_________________
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 » where to set default value to xml msg element?
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.