|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
esql 'REFERENCE TO' problem in parsing |
« View previous topic :: View next topic » |
Author |
Message
|
nancyk |
Posted: Fri Apr 04, 2003 11:07 pm Post subject: esql 'REFERENCE TO' problem in parsing |
|
|
Newbie
Joined: 12 Feb 2003 Posts: 7
|
I am parsing an xml into a mrm message. I created a MRM mesasge with following structure :
ClientCount - length(3)
(Now starts, a repeating dataset whose repetition is equal to value of ClientCount.)
ssn - length(10)
accountNum - length(4)
state - length(2)
My Input XML Message : <?xml version="1.0" ?><Clients><Info ssnumber='1234567899' accountNum='D189' state='CA' /><Info ssnumber='4679653987' accountNum='Z159' state='AR' /></Clients>
I am getting parsing problems.....is there any problem in my esql ? I used REFERENCE TO for dynamic reference....
Please tell me what is the problem,
Here is my esql :
-------------------------------------------------------------------------------------
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
SET OutputRoot.Properties.MessageSet = '.............';
SET OutputRoot.Properties.MessageType = '.............';
SET OutputRoot.Properties.MessageDomain = 'MRM';
SET OutputRoot.Properties.MessageFormat = 'CWF';
DECLARE myVal,myCounter INTEGER;
SET myVal= 1;
SET myCounter= CARDINALITY(InputRoot.XML.Clients.*[]);
SET OutputRoot.MRM.ClientCount = myCounter ;
-- SET values for client
DECLARE myref REFERENCE TO InputRoot.XML.Clients.Info[1];
WHILE LASTMOVE(myref)
DO
IF(myVal <= myCounter) THEN
SET OutputRoot.MRM."Client_Data"[myVal]."ssn" = myref. (XML.Attribute)ssnumber;
SET OutputRoot.MRM."Client_Data"[myVal]."accountNum" = myref. (XML.Attribute)accountNum;
SET OutputRoot.MRM."Client_Data"[myVal]."state" =
myref.(XML.Attribute)state;
SET myref = myref + 1;
SET myVal = myVal + 1;
MOVE myref NEXTSIBLING;
END IF;
END WHILE;
-------------------------------------------------------------------------------------
thanks in adv.
nancy |
|
Back to top |
|
 |
nancyk |
Posted: Sat Apr 05, 2003 9:47 pm Post subject: ESQL Dynamic reference |
|
|
Newbie
Joined: 12 Feb 2003 Posts: 7
|
Here is the information about my environment,
WMQI Version 2.1 - CSD 03
Sun Solaris
MQ Version 5.2
Please help me in solving the problem |
|
Back to top |
|
 |
kirani |
Posted: Sat Apr 05, 2003 9:58 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Please post your ExceptionList if the following code doesn't work.
Code: |
SET OutputRoot.Properties.MessageSet = '.............';
SET OutputRoot.Properties.MessageType = '.............';
SET OutputRoot.Properties.MessageFormat = 'CWF';
DECLARE myVal,myCounter INTEGER;
SET myVal= 1;
SET myCounter= CARDINALITY(InputRoot.XML.(XML.Element)Clients.*[]);
SET OutputRoot.MRM.ClientCount = myCounter ;
-- SET values for client
DECLARE myref REFERENCE TO InputRoot.XML.Clients(XML.Element).Info[1];
WHILE LASTMOVE(myref)
DO
SET OutputRoot.MRM."Client_Data"[myVal]."ssn" = myref.(XML.Attribute)ssnumber;
SET OutputRoot.MRM."Client_Data"[myVal]."accountNum" = myref.(XML.Attribute)accountNum;
SET OutputRoot.MRM."Client_Data"[myVal]."state" = myref.(XML.Attribute)state;
MOVE myref NEXTSIBLING;
SET myVal = myVal + 1;
END WHILE;
|
_________________ 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 |
|
 |
nancyk |
Posted: Sun Apr 06, 2003 12:28 am Post subject: |
|
|
Newbie
Joined: 12 Feb 2003 Posts: 7
|
Thanks Kirani for the response.
Here is the exceptions i have got.
Its an error related to CWF mismatch ....i dont know why the while loop is giving error.
Code: |
Apr 4 16:19:20 okley WMQIv210[23913]: [ID 702911 user.error] (BRKR_CLIENTS.def
ault)[55]BIP2628E: Exception condition detected on input node 'ProcessClient.MQInpu
t1'. : BRKR_CLIENTS.ac3a00ef-f200-0000-0080-aa9c00952e90: /build/S210_P/src/Data
FlowEngine/ImbMqInputNode.cpp: 1332: ImbMqInputNode::readQueue: ComIbmMQInputNod
e: 9b942932-f100-0000-0080-81e5a985be97
Apr 4 16:19:20 okley WMQIv210[23913]: [ID 702911 user.error] (BRKR_CLIENTS.def
ault)[55]BIP2230E: Error detected whilst processing a message in node 'ProcessClient
.MQOutput1'. : BRKR_CLIENTS.ac3a00ef-f200-0000-0080-aa9c00952e90: /build/S210_P
/src/DataFlowEngine/ImbMqOutputNode.cpp: 709: ImbMqOutputNode::evaluate: ComIbmM
QOutputNode: d39a2932-f100-0000-0080-81e5a985be97
BIP5286E: Message Translation Interface Writing Errors have occurred:ef
Elements - 9 par: ComIbmMQInputNode: 9b942932-f100-0000-0080-81e5a985be97eamFrom
ault)[55]BIP5286E: Message Translation Interface Writing Errors have occurred:ef
Elements - 9 par: ComIbmMQInputNode: 9b942932-f100-0000-0080-81e5a985be97eamFrom
pwf/cwf/cwfworker.cpp: 290: CWFWorker::write: :c00952e90: /build/S210_P/src/cpi/
pwf/cwf/cwfworker.cpp: 290: CWFWorker::write: :c00952e90: /build/S210_P/src/cpi/
age::write: :c00952e90: /build/S210_P/src/cpi/pwf/cwf/cwfmessage.cpp: 383: CMess
age::write: :c00952e90: /build/S210_P/src/cpi/pwf/cwf/cwfmessage.cpp: 383: CMess
/pwf/cwf/cwfcontext.cpp: 338: CContext::CheckDefaultValue: :build/S210_P/src/cpi
/pwf/cwf/cwfcontext.cpp: 338: CContext::CheckDefaultValue: :build/S210_P/src/cpi
Apr 4 16:19:20 okley WMQIv210[23913]: [ID 702911 user.error] (BRKR_CLIENTS.def
ault)[55]BIP5286E: Message Translation Interface Writing Errors have occurred:
: BRKR_CLIENTS.ac3a00ef-f200-0000-0080-aa9c00952e90: /build/S210_P/src/MTI/MTIfo
rBroker/MtiImbParser2/MtiImbParser.cpp: 1116: MtiImbParser::refreshBitStreamFrom
Elements - 9 par: ComIbmMQInputNode: 9b942932-f100-0000-0080-81e5a985be97
Apr 4 16:19:20 okley WMQIv210[23913]: [ID 702911 user.error] (BRKR_CLIENTS.def
ault)[55]BIP5286E: Message Translation Interface Writing Errors have occurred:
: BRKR_CLIENTS.ac3a00ef-f200-0000-0080-aa9c00952e90: /build/S210_P/src/MTI/MTIfo
rBroker/MtiImbParser2/MtiImbParser.cpp: 1116: MtiImbParser::refreshBitStreamFrom
Elements - 9 par: ComIbmMQInputNode: 9b942932-f100-0000-0080-81e5a985be97
Apr 4 16:19:20 okley WMQIv210[23913]: [ID 702911 user.error] (BRKR_CLIENTS.def
ault)[55]BIP5350E: Custom Wire Format writing error. While writing the message q
uoted above, the CWF writer encountered an error. : BRKR_CLIENTS.ac3a00ef-f200-
0000-0080-aa9c00952e90: /build/S210_P/src/cpi/pwf/cwf/cwfmessage.cpp: 383: CMess
age::write: :
Apr 4 16:19:20 okley WMQIv210[23913]: [ID 702911 user.error] (BRKR_CLIENTS.def
ault)[55]BIP5344E: CWF Output: Mismatch between logical definition and message t
ree. : BRKR_CLIENTS.ac3a00ef-f200-0000-0080-aa9c00952e90: /build/S210_P/src/cpi
/pwf/cwf/cwfcontext.cpp: 338: CContext::CheckDefaultValue: :
Apr 4 16:19:20 okley WMQIv210[23913]: [ID 702911 user.error] (BRKR_CLIENTS.def
ault)[55]BIP5344E: CWF Output: Mismatch between logical definition and message t
ree. : BRKR_CLIENTS.ac3a00ef-f200-0000-0080-aa9c00952e90: /build/S210_P/src/cpi
/pwf/cwf/cwfcontext.cpp: 338: CContext::CheckDefaultValue: : |
[/code] |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|