|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
problem while assigning REFERENCE |
« View previous topic :: View next topic » |
Author |
Message
|
vedantpatil |
Posted: Wed May 18, 2005 9:24 am Post subject: problem while assigning REFERENCE |
|
|
Novice
Joined: 10 Mar 2005 Posts: 19
|
Input xml may come in two formats
<A06_RESPONSE>
and
<M00_RESPONSE>
I want to dynamically assign xmlBody to root node.
DECLARE P INTEGER 0;
DECLARE N INTEGER 0;
SET P = CARDINALITY(InputRoot.XML.A06_RESPONSE[]);
SET N = CARDINALITY(InputRoot.XML.M00_RESPONSE[]);
IF (P='1') THEN
DECLARE xmlBody1 REFERENCE TO InputRoot.XML.A06_RESPONSE;
ELSEIF(N='1') THEN
DECLARE xmlBody1 REFERENCE TO InputRoot.XML.M00_RESPONSE;
END IF;
SET OutputRoot.MRM.CODE = xmlBody1.CHANNEL;
-----
-----
while deploying it giving me the error as
The correlation name 'xmlBody1' is not valid. Those in scope are: , Environment, InputLocalEnvironment, OutputLocalEnvironment, InputRoot, InputBody, InputProperties, OutputRoot, InputExceptionList, OutputExceptionList, InputDestinationList, OutputDestinationList, P, N.
can somebody help me.. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 18, 2005 9:29 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You're declaring your reference in a block (IF..ELSEIF...END).
The reference is only good within that block.
Try ignoring the if statement entirely, and
Code: |
DECLARE xmlBody1 REFERENCE TO InputRoot.XML.[1]; |
Or whatever the current, correct, syntax for "first child" is. _________________ I am *not* the model of the modern major general. |
|
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
|
|
|
|