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 » Altering environment using XPath and Java

Post new topic  Reply to topic
 Altering environment using XPath and Java « View previous topic :: View next topic » 
Author Message
crossland
PostPosted: Thu Jul 09, 2009 5:55 am    Post subject: Altering environment using XPath and Java Reply with quote

Master

Joined: 26 Jun 2001
Posts: 248

Trying to set a value using Xpath in the Java Compute Node.

The structure of the tree is
t1
t2
t3
s
s1

where s and s1 repeat for every event.

The code is as follows:

MbElement position = msgAssembly.getGlobalEnvironment().getRootElement();

String ID = "/t1/t2/t3/?$s/?s1[set-value(9)]";

MbXPath xpth = new MbXpath(ID);
position.evaluateXPath(xpth);

This does not return an error of any sort or create anything on the environment tree. Changing ID to "/?t1/?t2/?t3/?$s/?s1[set-value(9)]" causes another branch to be created on the end, even though the environment tree already contains t1,t2 and t3. There are no namespaces in use.

Unforunately, the Java debugger will not shown the expanded tree which isn't very helpful. However, I can see the environment tree when the Java Compute node finshes. And the trace doesn't seem to give any explanation either. So, combined with the rather sketchy documentation in this area, I would be very grateful for any pointers!

Thanks for any help.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jul 09, 2009 6:19 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
The structure of the tree is
t1
t2
t3
s
s1
I bet it's not. You need to use [code] tags to preserve the indentation
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 » Altering environment using XPath and Java
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.