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 field REFERENCING

Post new topic  Reply to topic
 XML field REFERENCING « View previous topic :: View next topic » 
Author Message
Lillian
PostPosted: Mon Feb 06, 2006 2:16 am    Post subject: XML field REFERENCING Reply with quote

Centurion

Joined: 15 Apr 2002
Posts: 102

I am not very familiar with xml datatypes,
How does one reference "Value" in the following trace.

(0x1000015)Field = (
(0x300000B)Name = 'TAXYEAR'
(0x1000013)Value = (
(0x200000B) = '28022003'
)
(0x3000015)Other = 'None'
InputBody.Field.Value returns NULL


Where as from
(0x1000015)Field = (
(0x300000B)Name = 'TAXYEAR'
(0x3000015)Test = '28022003'
(0x3000015)Other = 'None'

InputBody.Field.Test returns '28022003'


I think it has something to do with the (0x200000B) level name.
Please help.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Mon Feb 06, 2006 2:29 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi Lillian,

It would be simpler for us to help you if u just show us the input XML and then the code.

Regards.
Back to top
View user's profile Send private message Send e-mail
Lillian
PostPosted: Mon Feb 06, 2006 2:54 am    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2002
Posts: 102

The actual xml is huge , but a snippet is as below:I am looking to map the value of TAXYEAR ie "28022003" but my selects are returning NULL.


XXXXXXXXXXXx
SET Environment.variables.NonSTDInfo[] = ( SELECT (NSTDI) from "InputBody"."Reply"."OLifE"."OLifEExtension"."NonStandardInfo"[] as NSTDI ) where NSTDI."Field"."Name" ='TAXYEAR');
XXXXXX

<OLifEExtension> <DocumentName>LACO-Tax Certificate</DocumentName>
<NonStandardInfo>
<Field> <Name>PARTY.TYPE</Name> <Value>300</Value> <Other>None</Other>
</Field>
<Field> <Name>EMAIL</Name> <Test>sastri@sastri.co.za</Test> <Other>None</Other></Field>
<Field> <Name>TAXYEAR</Name> <Value>28022003</Value> <Other>None</Other> </Field>
<Field> <Name>TAXAMOUNT</Name> <Value>6411.23</Value> <Other>None</Other> </Field>
<Field> <Name>TYPE</Name> <Value>RA</Value> <Other>None</Other> </Field>
</NonStandardInfo>
</OLifEExtension>
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Mon Feb 06, 2006 3:05 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi Lillian,

Ur select statement seems to have an extra ")"...you should be getting an error due to that....

I hope you are tracing down the hierarchy("InputBody"."Reply"."OLifE"."OLifEExtension"."NonStandardInfo") correctly ...what is the name of the input message,,....i mean the First XML tag.

Also it should be SELECT NSTDI.* from.....

Regards.
Back to top
View user's profile Send private message Send e-mail
Lillian
PostPosted: Mon Feb 06, 2006 3:47 am    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2002
Posts: 102

I am dragging the elements from the MRM definition... so I think the tree is OK.
Still having issues as soon as I reference the Name or Value ie

SET Environment.variables.NonSTDInfo[] = ( SELECT (NSTDI.*) from "InputBody".TXLife."Reply"."OLifE"."OLifEExtension"."NonStandardInfo"[] as NSTDI where NSTDI."Field".(XML.Element)Name.(XML.Content)='TAXYEAR');

returns NULL
BUT

SET Environment.variables.NonSTDInfo[] = ( SELECT (NSTDI.*) from "InputBody".TXLife."Reply"."OLifE"."OLifEExtension"."NonStandardInfo"[] as NSTDI );

Returns data in the tree.(trace)

Light on the "any" datatypes would be appreciated. OLifEExtension is defined as "any".
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Mon Feb 06, 2006 4:12 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi Lillian,

Lillian wrote:
so I think the tree is OK

Then why did you have to change
Code:
"InputBody"."Reply"."OLifE"

to
Code:
"InputBody".TXLife."Reply"."OLifE"



Anyway, since ur second snippet is working that means that the reference is ok now. The reason for not getting the tree in the first case is not the datatypes...atleast not in your case.
You should try
Code:
where NSTDI."Field"."Name"='TAXYEAR';

It should work, run it through the debugger and go step by step.

Regards.
Back to top
View user's profile Send private message Send e-mail
Lillian
PostPosted: Mon Feb 06, 2006 4:21 am    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2002
Posts: 102

I have already tried without the xml definition as suggested.... still not working.

Can someone please explain the difference in the trace display specifically what the B in the tagline means.

I am able to reference Test and not Name.

(0x300000B)Name = 'TAXYEAR'
(0x3000015)Test = '28022003'
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Mon Feb 06, 2006 4:32 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

0x300000B is simply a Hex/Binary representation.....it is not of significance.

I dont understand....you sometimes tell me that '28022003' is contained in the field "Value"...In your last post it is in "Test"...

I think you need to use one sample for testing your code...and make sure the occurance of Field where Name=TAXYEAR exists...

Regards.
Back to top
View user's profile Send private message Send e-mail
Lillian
PostPosted: Mon Feb 06, 2006 4:37 am    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2002
Posts: 102

This is what I am confused about.

If I change the tag name to "Test", the selects works but not if the tag name is "Value"
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Feb 06, 2006 5:40 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Value is a reserved word.

If you want to use it as an identifier in your message tree, you need to put it in double-quotes.

Try InputBody.Field."Value", rather than InputBody.Field.Value.
_________________
I am *not* the model of the modern major general.
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 field REFERENCING
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.