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 » xml- selecting tc attribute

Post new topic  Reply to topic
 xml- selecting tc attribute « View previous topic :: View next topic » 
Author Message
Lillian
PostPosted: Tue Mar 14, 2006 2:04 am    Post subject: xml- selecting tc attribute Reply with quote

Centurion

Joined: 15 Apr 2002
Posts: 102

WMQI 2.1

I am trying to select data from an xml based on the tc value ( attribute of the fields.

i am using an MRM imported from an xsd.

My problem is that i seem to "LOSE" the tc attribute as soon as I output to tree to the Environment variables and any subsequent select from the variables based on tc return NULL.
The id and other Relation attributes however come thru

I suspect the problem lies with MRM any ideas?


INCOMING XML:

<Relation id="CALREL1" OriginatingObjectID="CALHOLD1" RelatedObjectID="CALPARTY2">
<RelationKey>D012345</RelationKey>
<RelatedObjectType tc="6">PARTY</RelatedObjectType>
<RelationRoleCode tc="8">OWNER</RelationRoleCode>
<BenefRelationRoleCode tc="1" />
</Relation>


ESQL:

SET Environment.variables.RelatedObjectIDOwner[] = ( SELECT (RELATION) from "InputBody"."Reply"."OLifE"."Relation"[] as RELATION where RELATION."RelationRoleCode"."tc" ='8');

TRACE output:( note no tc attributes)

(0x1000000)RelatedObjectIDOwner = (
(0x1000000)RELATION = (
(0x3000000)id = 'CALREL1'
(0x3000000)OriginatingObjectID = 'CALHOLD1'
(0x3000000)RelatedObjectID = 'CALPARTY2'
(0x3000000)RelationKey = 'D012345'
(0x3000000)RelatedObjectType = 'PARTY'
(0x3000000)RelationRoleCode = 'OWNER'
(0x3000000)BenefRelationRoleCode = ''
Back to top
View user's profile Send private message
dipankar
PostPosted: Tue Mar 14, 2006 2:23 am    Post subject: Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

It may help you.

Code:
Create FIRSTCHILD of Environment DOMAIN 'XML' Name 'Variables';


It is required to hold XML tree with attribute.

After that you populate environment variable by select clause.
_________________
Regards
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Tue Mar 14, 2006 3:08 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi Lillian,

Search and thou shall find...

http://www.mqseries.net/phpBB2/viewtopic.php?t=19429&highlight=asbitstream+environment

Regards.
Back to top
View user's profile Send private message Send e-mail
Lillian
PostPosted: Tue Mar 14, 2006 3:31 am    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2002
Posts: 102

Create FIRSTCHILD of Environment DOMAIN 'XML' Name 'Variables' ;

SET Environment.XML.Variables[] = ( SELECT (RELATION) from "InputBody"."Reply"."OLifE"."Relation"[] as RELATION where RELATION."RelationRoleCode"."tc" ='8');


still gives me :

(0x1000000)RELATION = (
(0x3000000)id = 'CALREL1'
(0x3000000)OriginatingObjectID = 'CALHOLD1'
(0x3000000)RelatedObjectID = 'CALPARTY2'
(0x3000000)RelationKey = 'D012345'
(0x3000000)RelatedObjectType = 'PARTY'
(0x3000000)RelationRoleCode = 'OWNER'
(0x3000000)BenefRelationRoleCode = ''

and SET Environment.Variables[] .... is empty
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Tue Mar 14, 2006 3:49 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi Lillian,

tc is an attribute not a field.

Add "....".(XML.Attr)"tc" =

Hope it works.

Regards.
Back to top
View user's profile Send private message Send e-mail
Lillian
PostPosted: Tue Mar 14, 2006 3:54 am    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2002
Posts: 102

so is :
id="CALREL1"
OriginatingObjectID="CALHOLD1"
RelatedObjectID="CALPARTY2"

my confusion is why the above is in trace and not the tc
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Tue Mar 14, 2006 4:03 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi Lillian,

http://www.mqseries.net/phpBB2/viewtopic.php?t=25028&highlight=attributes+mrm

Regards.
Back to top
View user's profile Send private message Send e-mail
dipankar
PostPosted: Wed Mar 15, 2006 7:16 pm    Post subject: Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

Code:
SET Environment.XML.Variables[] = ( SELECT (RELATION) from "InputBody"."Reply"."OLifE"."Relation"[] as RELATION where RELATION."RelationRoleCode"."tc" ='8');


XML is domain, not a variable.

You should use

Code:
SET Environment.Variables[] = ( SELECT (RELATION) from "InputBody"."Reply"."OLifE"."Relation"[] as RELATION where RELATION."RelationRoleCode"."tc" ='8');


Hope it works
_________________
Regards
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Wed Mar 15, 2006 8:15 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi dipankar,

So yes, XML is not a domain, it would get created as a variable in the tree...there is nothing stopping you to use it in the tree structure....

How could that be a reason for the problem ?

Regards.
Back to top
View user's profile Send private message Send e-mail
dipankar
PostPosted: Wed Mar 15, 2006 9:04 pm    Post subject: Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

Hi Elvis,

Code:
Create FIRSTCHILD of Environment DOMAIN 'XML' Name 'Variables';
SET Environment.Variables[] = ( SELECT (RELATION) from "InputBody"."Reply"."OLifE"."Relation"[] as RELATION where RELATION."RelationRoleCode"."tc" ='8');

Here Environment.Variables only knows about the XML parser because we have created Variables as firstchild, not XML variable as firstchild.

Please correct me if I am wrong.
_________________
Regards
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Wed Mar 15, 2006 9:18 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

oo..oooo......oooooo

Ur previous post didn't have the
Quote:
Create FIRSTCHILD of Environment DOMAIN 'XML' Name 'Variables';

and so i got mislead...

You are right....Good on you mate.

Regards.
Back to top
View user's profile Send private message Send e-mail
dipankar
PostPosted: Wed Mar 15, 2006 9:30 pm    Post subject: Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

Hi Elvis,
Thank you very much.

Hi Lillian,
I have tested with your xml message in my own system
Input:
Quote:
<Reply>
<OLifE>
<Relation id="CALREL1" OriginatingObjectID="CALHOLD1" RelatedObjectID="CALPARTY2">
<RelationKey>D012345</RelationKey>
<RelatedObjectType tc="6">PARTY</RelatedObjectType>
<RelationRoleCode tc="8">OWNER</RelationRoleCode>
<BenefRelationRoleCode tc="1" />
</Relation>
</OLifE>
</Reply>

Code:
Code:
Create FIRSTCHILD of Environment DOMAIN 'XML' Name 'Variables';
SET Environment.Variables[] = ( SELECT (RELATION) from "InputBody"."Reply"."OLifE"."Relation"[] as RELATION where RELATION."RelationRoleCode"."tc" ='8');
SET Environment.XML.Variables[] = ( SELECT (RELATION) from "InputBody"."Reply"."OLifE"."Relation"[] as RELATION where RELATION."RelationRoleCode"."tc" ='8');


Trace:

(
Quote:
0x1000010)Variables = (
(0x1000000)RELATION = (
(0x3000000)id = 'CALREL1'
(0x3000000)OriginatingObjectID = 'CALHOLD1'
(0x3000000)RelatedObjectID = 'CALPARTY2'
(0x2000000) = '
'
(0x1000000)RelationKey = (
(0x2000000) = 'D012345'
)
(0x2000000) = '
'
(0x1000000)RelatedObjectType = (
(0x3000000)tc = '6'
(0x2000000) = 'PARTY'
)
(0x2000000) = '
'
(0x1000000)RelationRoleCode = (
(0x3000000)tc = '8'
(0x2000000) = 'OWNER'
)
(0x2000000) = '
'
(0x1000000)BenefRelationRoleCode = (
(0x3000000)tc = '1'
)
(0x2000000) = '
'
)
)
(0x1000000)XML = (
(0x1000000)Variables = (
(0x1000000)RELATION = (
(0x3000000)id = 'CALREL1'
(0x3000000)OriginatingObjectID = 'CALHOLD1'
(0x3000000)RelatedObjectID = 'CALPARTY2'
(0x3000000)RelationKey = 'D012345'
(0x3000000)RelatedObjectType = 'PARTY'
(0x3000000)RelationRoleCode = 'OWNER'
(0x3000000)BenefRelationRoleCode = ''
)
)
)
)


Hope it helps you.
_________________
Regards
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 » xml- selecting tc attribute
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.