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 » debugger or reference problem? i'm not sure(solved)

Post new topic  Reply to topic
 debugger or reference problem? i'm not sure(solved) « View previous topic :: View next topic » 
Author Message
special_agent_Queue
PostPosted: Wed Nov 01, 2006 8:47 am    Post subject: debugger or reference problem? i'm not sure(solved) Reply with quote

Centurion

Joined: 27 Jul 2006
Posts: 102

I am taking a message in as a blob, and stripping some things off the front and end of the message. I am storing this new blob in the environment tree (Environment.Variables.TempBlob).
Code:
      SET Environment.Variables.TempBlob = InputMsg;
      DECLARE MsgPointer REFERENCE TO Environment.Variables.TempBlob;
      CREATE NEXTSIBLING OF MsgPointer DOMAIN ('XMLNSC') PARSE(Environment.Variables.TempBlob ENCODING 546 CCSID 437 OPTIONS FolderBitStream);
      MOVE MsgPointer NEXTSIBLING;

After this code, the MsgPointer points at the new field that was created from the parsed new blob.

I am having trouble accessing a field in this XML subtree. So I use the debugger to try and figure out what is wrong.
When I execute the MOVE statement in the code above, I check the variables window. What I see is

Code:
MsgPointer
   SOAP-ENV = http://schemas.xmlsoap.org/soap/envelope/
   Body
      CTLBLOCK
      MSGVARS
         +VAR
         +VAR
         VAR = L01200612D
         VAR = C862A38A
         VAR = DEMO1
         +VAR
         VAR = F01200612
         VAR = AD920459C4BE439F9CC48F2E7877CFB7
         VAR = C862A38A
         VAR = DEMO1
         VAR = Freddie
         VAR = King
         +VAR
         VAR = AMICA
         VAR = AUTO
         VAR = DP TEST 7.13.01
         VAR = AMQ WMB6        _Ö6E .!.
         VAR = C862A38A
         VAR = DEMO1
         VAR = B2814A9AF8B4F318992D30B448F5342
         VAR = B2814A9AF8B4F318992D30B448F5342
         VAR = 01
         VAR = SUCCESS
         VAR = 0.109
         VAR = W
         +VAR
         +VAR
         VAR = NB
         VAR = B2814A9AF8B4F318992D30B448F5342

Envelope
   SOAP-ENV = http://schemas.xmlsoap.org/soap/envelope/
   Body
      CTLBLOCK
      MSGVARS
         +VAR
         +VAR
         +VAR = L01200612D
         +VAR = C862A38A
         +VAR = DEMO1
         +VAR
         +VAR = F01200612
         +VAR = AD920459C4BE439F9CC48F2E7877CFB7
         +VAR = C862A38A
         +VAR = DEMO1
         +VAR = Freddie
         +VAR = King
         +VAR
         +VAR = AMICA
         +VAR = AUTO
         +VAR = DP TEST 7.13.01
         +VAR = AMQ WMB6        _Ö6E .!.
         +VAR = C862A38A
         +VAR = DEMO1
         +VAR = B2814A9AF8B4F318992D30B448F5342
         +VAR = B2814A9AF8B4F318992D30B448F5342
         +VAR = 01
         +VAR = SUCCESS
         +VAR = 0.109
         +VAR = W
         +VAR
         +VAR
         +VAR = NB
         +VAR = B2814A9AF8B4F318992D30B448F5342

If you notice, the Environment tree has pluses next to each VAR (they all have attributes), but the MsgPointer shows only pluses next to VAR s that do not have a value, even though all fields have attributes.
I'm not really sure what is wrong here. Is this a debugger issue? Or a reference issue? Or is this the way references were designed to act, or the debugger was designed to act, etc?

Anyone have any helpful ideas?

Thanks so much!


Last edited by special_agent_Queue on Fri Nov 03, 2006 6:25 am; edited 1 time in total
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Nov 01, 2006 9:33 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I think it's the difference between NameValue elements and Name elements with Value children.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
special_agent_Queue
PostPosted: Wed Nov 01, 2006 9:39 am    Post subject: Reply with quote

Centurion

Joined: 27 Jul 2006
Posts: 102

Thanks.
Is this something I can correct? If so, how?
Back to top
View user's profile Send private message
special_agent_Queue
PostPosted: Thu Nov 02, 2006 12:55 pm    Post subject: Reply with quote

Centurion

Joined: 27 Jul 2006
Posts: 102

I'm pretty much at my wits end with this one. I've tried every which way I can think of to try and access this field. I've even separated into 2 compute nodes, left it as a blob in the first and passed it thru a RCD before the 2nd which makes it XMLNSC, and in the 2nd node I still cannot access it.
Here's the input message:
Quote:
Thu Jul 13 11:13:14.723 2006 pid=00099724 tid=00018648**********
Content-Type: text/xml
Content-Transfer-Encoding: 8bit

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<CTLBLOCK>
<UNIQUE_ID>8575294655171792006-1833</UNIQUE_ID>
<REQTYPE>i_AddWIP</REQTYPE>
<RESULTQMGR>CCHUBF</RESULTQMGR>
</CTLBLOCK>
<MSGVARS>
<VAR NAME="APPDATA"></VAR>
<VAR NAME="ARCKEY"></VAR>
<VAR NAME="CLAIMNUM">L01200612D</VAR>
<VAR NAME="CREATETIME">C862A38A</VAR>
<VAR NAME="CURRUSER">DEMO1</VAR>
<VAR NAME="DESC"></VAR>
<VAR NAME="FILENUM">F01200612</VAR>
<VAR NAME="FORMSETID">AD920459C4BE439F9CC48F2E7877CFB7</VAR>
<VAR NAME="FROMTIME">C862A38A</VAR>
<VAR NAME="FROMUSER">DEMO1</VAR>
<VAR NAME="INSUREDFIRSTNAME">Freddie</VAR>
<VAR NAME="INSUREDLASTNAME">King</VAR>
<VAR NAME="INUSE"></VAR>
<VAR NAME="KEY1">AMICA</VAR>
<VAR NAME="KEY2">AUTO</VAR>
<VAR NAME="KEYID">DP TEST 7.13.01</VAR>
<VAR NAME="MSGID">AMQ WMB6 _è6E .!.</VAR>
<VAR NAME="MODIFYTIME">C862A38A</VAR>
<VAR NAME="ORIGUSER">DEMO1</VAR>
<VAR NAME="RECNUM">B2814A9AF8B4F318992D30B448F5342</VAR>
<VAR NAME="RECORDID">B2814A9AF8B4F318992D30B448F5342</VAR>
<VAR NAME="RECTYPE">01</VAR>
<VAR NAME="RESULTS">SUCCESS</VAR>
<VAR NAME="SERVERTIMESPENT">0.109</VAR>
<VAR NAME="STATUSCODE">W</VAR>
<VAR NAME="TOTIME"></VAR>
<VAR NAME="TOUSER"></VAR>
<VAR NAME="TRANCODE">NB</VAR>
<VAR NAME="UNIQUE_ID">B2814A9AF8B4F318992D30B448F5342</VAR>
</MSGVARS>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

End of message**********

Here's the message after I trim off some things in the front and back (it's as a blob, and I included the character representation):
Quote:
3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e0d0a3c534f41502d454e563a456e76656c6f706520786d6c6e733a534f41502d454e563d22687474703a2f2f736368656d61732e786d6c736f61702e6f72672f736f61702f656e76656c6f70652f223e0d0a3c534f41502d454e563a426f64793e0d0a3c4d5347564152533e0d0a3c5641523e414d5120574d423620202020202020205fe83645202e212e3c2f5641523e0d0a3c2f4d5347564152533e0d0a3c2f534f41502d454e563a426f64793e0d0a3c2f534f41502d454e563a456e76656c6f70653e

Quote:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<CTLBLOCK>
<UNIQUE_ID>8575294655171792006-1833</UNIQUE_ID>
<REQTYPE>i_AddWIP</REQTYPE>
<RESULTQMGR>CCHUBF</RESULTQMGR>
</CTLBLOCK>
<MSGVARS>
<VAR NAME="APPDATA"></VAR>
<VAR NAME="ARCKEY"></VAR>
<VAR NAME="CLAIMNUM">L01200612D</VAR>
<VAR NAME="CREATETIME">C862A38A</VAR>
<VAR NAME="CURRUSER">DEMO1</VAR>
<VAR NAME="DESC"></VAR>
<VAR NAME="FILENUM">F01200612</VAR>
<VAR NAME="FORMSETID">AD920459C4BE439F9CC48F2E7877CFB7</VAR>
<VAR NAME="FROMTIME">C862A38A</VAR>
<VAR NAME="FROMUSER">DEMO1</VAR>
<VAR NAME="INSUREDFIRSTNAME">Freddie</VAR>
<VAR NAME="INSUREDLASTNAME">King</VAR>
<VAR NAME="INUSE"></VAR>
<VAR NAME="KEY1">AMICA</VAR>
<VAR NAME="KEY2">AUTO</VAR>
<VAR NAME="KEYID">DP TEST 7.13.01</VAR>
<VAR NAME="MSGID">AMQ WMB6 _è6E .!.</VAR>
<VAR NAME="MODIFYTIME">C862A38A</VAR>
<VAR NAME="ORIGUSER">DEMO1</VAR>
<VAR NAME="RECNUM">B2814A9AF8B4F318992D30B448F5342</VAR>
<VAR NAME="RECORDID">B2814A9AF8B4F318992D30B448F5342</VAR>
<VAR NAME="RECTYPE">01</VAR>
<VAR NAME="RESULTS">SUCCESS</VAR>
<VAR NAME="SERVERTIMESPENT">0.109</VAR>
<VAR NAME="STATUSCODE">W</VAR>
<VAR NAME="TOTIME"></VAR>
<VAR NAME="TOUSER"></VAR>
<VAR NAME="TRANCODE">NB</VAR>
<VAR NAME="UNIQUE_ID">B2814A9AF8B4F318992D30B448F5342</VAR>
</MSGVARS>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Here's the field that I'm trying to access:
Quote:
<VAR NAME="MSGID">AMQ WMB6 _è6E .!.</VAR>

Currently my code looks like this:
Code:
      DECLARE warehousedMsgId CHARACTER;
      SET warehousedMsgId = FIELDVALUE(InputRoot.XMLNSC."SOAP-ENV:Envelope"."SOAP-ENV:Body".MSGVARS.VAR[17]);
Back to top
View user's profile Send private message
mgk
PostPosted: Thu Nov 02, 2006 2:32 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi,

This code is wrong:

Code:
InputRoot.XMLNSC."SOAP-ENV:Envelope"."SOAP-ENV:Body".MSGVARS.VAR[17]


The quotes mean that you are not using namespaces at all. Instead the code above means you are looking for an element called "SOAP-ENV:Envelope" (as one word) as the Root element and so on to the next element. Remove the quotes, declare SOAP-ENV as a NAMESPACE variable and read the help on how to use namespaces properly.

Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
special_agent_Queue
PostPosted: Fri Nov 03, 2006 6:21 am    Post subject: Reply with quote

Centurion

Joined: 27 Jul 2006
Posts: 102

Thanks, mgk

Was this allowed on version 5? I've only been going by advice from others who had been working here before me.
Back to top
View user's profile Send private message
mgk
PostPosted: Fri Nov 03, 2006 6:55 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi,

No, this never worked in V5.

Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
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 » debugger or reference problem? i'm not sure(solved)
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.