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 » Accessing OutPutTree dynamically

Post new topic  Reply to topic
 Accessing OutPutTree dynamically « View previous topic :: View next topic » 
Author Message
neo_revolution
PostPosted: Thu Mar 11, 2004 6:48 am    Post subject: Accessing OutPutTree dynamically Reply with quote

Voyager

Joined: 21 Oct 2003
Posts: 80
Location: NJ

Hello,

I am trying to do something like this,

-------
CREATE FIELD OutputRoot.XML.Message.Temp;
CREATE FIELD OutputRoot.XML.Message.Body;


SET OutputRoot.XML.Message.Temp.(XML.AsisElementContent) = InputRoot.XML.Field1;

SET OutputRoot.XML.Message.Body = OutputRoot.XML.Message.Temp.TempField1;

------------------

Its returning me a null. It seems I can't access subtree of the OutputRoot's Temp tree.

Is there a way to access subtree's of the OutputRoots dynamically created subtrees.

Thanks in advance.
Back to top
View user's profile Send private message Yahoo Messenger
EddieA
PostPosted: Thu Mar 11, 2004 7:26 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

From the coding you've provided, you haven't built OutputRoot.XML.Message.Temp.TempField1, so trying to read it will give you null,

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
neo_revolution
PostPosted: Thu Mar 11, 2004 7:31 am    Post subject: Reply with quote

Voyager

Joined: 21 Oct 2003
Posts: 80
Location: NJ

I am assigning a XML tree for the Temp variable and I am trying to access an element from that subtree. Can I do that?
Back to top
View user's profile Send private message Yahoo Messenger
Missam
PostPosted: Thu Mar 11, 2004 7:56 am    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

yes you can access the fields in the output tree structure(if they exists).
Back to top
View user's profile Send private message
kirani
PostPosted: Thu Mar 11, 2004 11:38 pm    Post subject: Reply with quote

Jedi Knight

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

Can you post a sample input message?
_________________
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
neo_revolution
PostPosted: Fri Mar 12, 2004 6:47 am    Post subject: Reply with quote

Voyager

Joined: 21 Oct 2003
Posts: 80
Location: NJ

Here is whats actually happening ........

I am converting a sub-xml tree into bitstream using ASBITSTREAM.

<Messsage>
<Header>
..........
</Header>
<Body>
<Field1>428905787583904788465784365478956</Field1>
</Body>
</Message>

This is my input message....

The bitstream is a sub-xml tree say this structure...
<Field1>
<element1>a</element1>
<element2>b</element2>
<element3>c</element3>
<element4>d</element4>
</Field1>


In the compute node I am casting bitstream to CHAR and getting the XML structure....

DECLARE msgBlob BLOB;
DECLARE charString CHAR;

SET msgBLOB = InputRoot.XML.Message.Body.Field1;
SET OutputRoot.XML.Message.Temp.(XML.AsisElementContent) = CAST
(msgBLOB as CHAR);

SET OutputRoot.XML.Message.ActualField = OutputRoot.XML.Message.Temp.Field1;

The last statement is not working its setting to null....

Thanks.
Back to top
View user's profile Send private message Yahoo Messenger
jefflowrey
PostPosted: Fri Mar 12, 2004 7:04 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Quote:
The bitstream is a sub-xml tree say this structure...


No. It's a bitstream.

If you want a tree from a bitstream, you have to PARSE it.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
neo_revolution
PostPosted: Fri Mar 12, 2004 7:55 am    Post subject: Reply with quote

Voyager

Joined: 21 Oct 2003
Posts: 80
Location: NJ

I parsed it using CREATE FIELD options and I was able to access the bitstream xml tree. Thanks for the help.
Back to top
View user's profile Send private message Yahoo Messenger
Missam
PostPosted: Fri Mar 12, 2004 8:33 am    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

Use a trace node after the compute node and print the structure of OutputRoot.XML.Message and see whether the structure represent the structure you are looking for.and can you print the trace here
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 » Accessing OutPutTree dynamically
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.