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 » inputRoot["MRM][][].setvalue not working

Post new topic  Reply to topic
 inputRoot["MRM][][].setvalue not working « View previous topic :: View next topic » 
Author Message
DirtyHowi
PostPosted: Wed Dec 17, 2014 10:59 am    Post subject: inputRoot["MRM][][].setvalue not working Reply with quote

Novice

Joined: 17 Feb 2014
Posts: 22

i need to override the input root in a .net compute node for two fields that are in the tree based on decisions made in the compute node, the decision stuff works, but i cant override the inputroot values with .setvalue().

what is the best way to accomplish this? thats not esql.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Dec 17, 2014 11:02 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Why are you trying to change InputRoot? It's not changeable for a reason.

If you need to change the message before it passes to a DecisionService node, you need to change the OutputRoot.
Back to top
View user's profile Send private message
DirtyHowi
PostPosted: Wed Dec 17, 2014 12:42 pm    Post subject: Reply with quote

Novice

Joined: 17 Feb 2014
Posts: 22

I tried that too, no bueno.

basically i need to set two fields on the output to values determined by other logic, simple strings, nothing complicated. then propagate that from the .net compute node to the remainder of the flow.

this should not be this difficult, its not in normal programming. set x=y if x==y do this...i have a xml tree in the form of an MRM, find the element i want, set the value of said element to a value (if needed) and propagate to out terminal of node.

outputmessage, inputmessage, outputroot, inputroot all have the same issue, object not set to an instance of an object. but i can tear them apart all day long and transfer the values that way to strings, ints, doubles, whatever i want. but i cant replace the element (of string) with another value (of string)???
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Dec 17, 2014 12:55 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

There's lots of samples of how to set fields in a message tree using .NET at http://www.redbooks.ibm.com/Redbooks.nsf/RedbookAbstracts/sg248020.html?Open

You shouldn't be using MRM for any version that has a .NET Compute node. Particularly for XML - you should be using XMLNSC.
Back to top
View user's profile Send private message
DirtyHowi
PostPosted: Wed Dec 17, 2014 12:58 pm    Post subject: Reply with quote

Novice

Joined: 17 Feb 2014
Posts: 22

no choice. its coming from COBOL. old school cobol at that.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Dec 17, 2014 1:04 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

DirtyHowi wrote:
no choice. its coming from COBOL. old school cobol at that.


If it's coming from COBOL, you should be using DFDL.

If it's *XML* data, from *anywhere*, you should be using XMLNSC.

None of this has anything to do with difficulties setting fields in the message tree.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 17, 2014 1:19 pm    Post subject: Reply with quote

Grand High Poobah

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

DirtyHowi wrote:
no choice. its coming from COBOL. old school cobol at that.


DFDL does COBOL just fine. I'm a witness. Even OS-COBOL.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 17, 2014 1:22 pm    Post subject: Reply with quote

Grand High Poobah

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

DirtyHowi wrote:
I tried that too, no bueno.


I don't think that's an error message, even in the Spanish language version.

DirtyHowi wrote:
but i cant replace the element (of string) with another value (of string)???


Yes you can. What does the user trace (not the debugger) show to be happening when the assignment is executed? Or what is the actual BIP error thrown?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
DirtyHowi
PostPosted: Thu Dec 18, 2014 7:41 am    Post subject: Reply with quote

Novice

Joined: 17 Feb 2014
Posts: 22

i'm debugging this in the .net compute node where the assignment is taking (supposedly) place. It is saying object not set to instance of object, the famous last bastion of microsoft.

if i have to recast the incoming message to DFDL i think i have an example of that somwhere.

I didnt write the original flow for this, i'm just adding a intercept for a message type from a particular set of distributors to check to see if they have gotten payment for items we are drop shipping for them. So i'm not real well versed in how this whole thing works in the first place.

it works fine if its not a vendor, mainly because i just copy the input to the output and send it along. its only when i want to change two fields of the input that i run in to trouble.

the incoming queue is set to MRM/Binary1 with the cobol copy book as its pattern.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Dec 18, 2014 7:57 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You wouldn't "cast" the message as a DFDL message.

You would re-import the Cobol copybook as a DFDL message definition, and then change the input node to use that instead of the MRM binary.

But again, that's really irrelevant to your problem using .NET.

Did you review the code in the redbook I mentioned?

Can you show your actual code, rather than just something like "setValue".
Back to top
View user's profile Send private message
DirtyHowi
PostPosted: Thu Dec 18, 2014 8:02 am    Post subject: Reply with quote

Novice

Joined: 17 Feb 2014
Posts: 22

issue solved.
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 » inputRoot["MRM][][].setvalue not working
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.