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 » problem while assigning REFERENCE

Post new topic  Reply to topic
 problem while assigning REFERENCE « View previous topic :: View next topic » 
Author Message
vedantpatil
PostPosted: Wed May 18, 2005 9:24 am    Post subject: problem while assigning REFERENCE Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Wed May 18, 2005 9:29 am    Post subject: Reply with quote

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
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 » problem while assigning REFERENCE
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.