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 » LocalEnvironment and Root C Plugin node

Post new topic  Reply to topic
 LocalEnvironment and Root C Plugin node « View previous topic :: View next topic » 
Author Message
seanrocket
PostPosted: Thu Jul 10, 2003 1:02 pm    Post subject: LocalEnvironment and Root C Plugin node Reply with quote

Newbie

Joined: 08 May 2003
Posts: 8

hello,

I am trying to add a labelname to the Localenvironment tree using a c plugin node. This labelname will be used by the Routetolabelnode to route the message.
I was able to output to the Localenvironment tree using a compute node but am not sure how to access the Localenvironment tree using a c plugin node.

The functionality that i want to accomplish in the plugin node which i have successfully done in a compute node is :


SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelname = OutputLocalEnvironment.Variables.Result.Service;

The questions I have are:
1) How is the Localenvironment tree related to the Root node? Is it a sibling or a child of root?

I tried using cniNextSibling of the output root element but found nothing.

inRootElement = cniRootElement(&rc, message);
outMsg = cniCreateMessage(&rc, cniGetMessageContext(&rc, message));
outRootElement = cniRootElement(&rc, outMsg);
cniCopyElementTree(&rc, inRootElement, outRootElement);
bodySibling = cniNextSibling(&rc, outRootElement);


I tried creating a new element called LocalEnvironment as a sibling of root using


localenv = cniCreateElementAfter(&rc,outRootElement);
cniSetElementType(&rc, localenv, CCI_ELEMENT_TYPE_NAME_VALUE);
cniSetElementName(&rc, localenv, "LocalEnvironment");

but this errored out.

2) So how can I write out to the Localenvironment tree using the c node utility functions?

I understand that the input message has an empty localenvironment tree but I have no way of accessing this through the utility functions that are available.


I tried tracing the output message using the trace node but i don't see the localenvironment output from the c plugin node. When I use the compute node, I do see that the values are being placed in the localenvironment tree.
-Sean
Back to top
View user's profile Send private message
kirani
PostPosted: Thu Jul 10, 2003 5:11 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Hi Sean,

1. LocalEnvironment is a different tree, and it's not related to Root. Root belongs to Message Tree. So in your Evaluate method, you need to work with pDestinationList parameter. The signature of this method is ...
Code:

void Evaluate(
   CciContext   *context,
   CciMessage   *pDestinationList,
   CciMessage   *pExceptionList,
   CciMessage   *pMessage)

You add/create elements into LocalEnvironment tree in similar way as you do for Message Tree.

2. Yes you do!

May I ask why do you want to write a plug-in node just to set the LabelName, this can be done very easily using ESQL.

I hope this helps.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
seanrocket
PostPosted: Mon Jul 14, 2003 3:04 pm    Post subject: Reply with quote

Newbie

Joined: 08 May 2003
Posts: 8

Thanks for your reply

The reason I want to use a plug in is because I need to use third party C++ libraries to evaluate my values from the messages. So I am creating a c plugin calling a C++ DLL and based on the C++ evaluation I will write the result to the labelname of the Localenvironement.
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 » LocalEnvironment and Root C Plugin node
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.