|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Problem with FiledType Function |
« View previous topic :: View next topic » |
Author |
Message
|
jefflowrey |
Posted: Wed Sep 12, 2007 2:05 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You can't magically RCD a tree from XMLNS to MRM.
You need to reparse it. This means you need to ASBITSTREAM and then CREATE FIELD... PARSE.
This is expensive, and usually unnecessary.
It seems like you have a) an input message, that is described by a Message Definition (an MRM model), b) some data you need to extract from some database, c) an output message, that is described by a Message Definition.
It seems that you should work with those, entirely. And not worry about XMLNS, and not worry about Attributes and Elements.
Your concerns about "causing problems in the future" are valid, to an extent. But you seem like you're trying to code yourself in knots to avoid having to make minor changes later - when something major like the interface changes.
You always have to code directly to a specific interface at some point. You always have to change code somewhere, when a specific interface changes.
I'm trying to wade through all this to figure out what you actually want to do.
I think you have to accept that you'll have to make at least some changes to your code if the names of things you need to send to Notes changes.
The best way I can suggest to minimize this is to create a variable of some kind - perhaps a User Defined Property, perhaps another database table that gets read into a local tree - that contains a list of valid fields in the Notes DB. Then you can loop over the fieldnames of the input record, and only add the things that have names contained in that list. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
gyadavil |
Posted: Wed Sep 12, 2007 2:11 pm Post subject: |
|
|
Acolyte
Joined: 01 Feb 2005 Posts: 62
|
I agree with you jeff. I guess hardcode the field names which I don't want to include in my output. Only issue here is if the db column and attribute column has the same name. I figured out other way. When I deleted the attributes from my message set, RCD trying to create them by force with a @ before the name. Like version got created as @version when there is no matching element in the message set. So I can filter based on this @ by assuming all my db columns does not start with @. As you said, if something changes infuture, I need to revisit the code.
Thanks for the help and explanation. |
|
Back to top |
|
 |
gyadavil |
Posted: Wed Sep 12, 2007 2:15 pm Post subject: |
|
|
Acolyte
Joined: 01 Feb 2005 Posts: 62
|
I have one last question. How what is the technique to use a varible name for the field name in an xml tree while constructing the output root.
I would like to use something like this
Set OutputRoot.XMLNS.<VARIABLE> = xyz
Where VARIABLE, I would like to change the value in a loop. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Sep 12, 2007 2:39 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
{} _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|
|
|
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
|
|
|
|