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 » Storing input message into Environment

Post new topic  Reply to topic
 Storing input message into Environment « View previous topic :: View next topic » 
Author Message
paranoid221
PostPosted: Tue Jan 20, 2009 8:58 am    Post subject: Storing input message into Environment Reply with quote

Centurion

Joined: 03 Apr 2006
Posts: 101
Location: USA

HAPPY NEW YEAR TO EVERYONE


One of the basic things in broker, but yet I seem to be struggling with this:

I'm trying to store the incoming XML into the Environment so that it can be accessed by all the other nodes in the flow.

Flow (this is just a sample, I've removed all the other nodes in the flow for the time being to ensure this part of the code works):
MQInput->Compute->MQOutput

SAMPLE CODE:
BEGIN
CREATE LASTCHILD OF Environment DOMAIN 'XMLNSC' NAME 'inMessage';
SET Environment.inMessage = InputRoot.XMLNSC;
DECLARE msgRef REFERENCE TO Environment.inMessage;
CALL CopyMessageHeaders();
SET OutputRoot.XMLNSC.tempMsg = msgRef.MsgLevel1.MsgSubLevel1.responseMsg;
SET OutputRoot.XMLNSC.tempCd = msgRef.MsgLevel1.MsgSubLevel1.responseCode;

RETURN TRUE;
END;

SAMPLE XML:
<MsgLevel1>
<MsgSubLevel1>
<responseMsg>RANDOM MESSAGE</responseMsg>
<responseCode>56</responseCode>
</MsgSubLevel1>
</MsgLevel1>

The above code throws the following errors.

Text XML Writing Errors have occurred
ParserException
File /build/S610_P/src/MTI/MTIforBroker/GenXmlParser4/ImbXMLNSCWriter.cpp
Line 880
Function ImbXMLNSCWriter::writeMisc
Type
Name
Label
Catalog BIPv610
Severity 3
Number 5016
Text Unexpected XML type at this point in document.
Insert
Type 5
Text tempCd[56]
Insert
Type 5
Text fieldType

I've run this in debug mode and everything in Compute Node evaluated fine and the above exception is thrown after the execution reaches the MQOutput node. I don't seem to understand why it is puking at the tempCd element.
Apart from this I've also tried other options including but not limited to creating a variable under Environment.Variables and assigning the input body to that variable. Nothing.Nada.Zilch. Same Error

Mebbe a few pair of good eyes on this forum can shed some light on this.

Thanks in Advance
_________________
LIFE is a series of complex calculations, somewhere multiplied by ZERO.
Back to top
View user's profile Send private message
WBI_user
PostPosted: Tue Jan 20, 2009 10:05 am    Post subject: Reply with quote

Partisan

Joined: 07 Aug 2001
Posts: 386

I think you need to add the root element to your output XML

SET OutputRoot.XMLNSC.MyMSG.tempMsg
=====
Back to top
View user's profile Send private message
RaviKrG
PostPosted: Tue Jan 20, 2009 11:36 am    Post subject: Reply with quote

Master

Joined: 07 Sep 2008
Posts: 240

Have the root element for the XML as the XML data should have a root.
Back to top
View user's profile Send private message
paranoid221
PostPosted: Mon Feb 02, 2009 3:04 am    Post subject: Reply with quote

Centurion

Joined: 03 Apr 2006
Posts: 101
Location: USA

I was on a small getaway for a week.. so apologise for not replying but after seeing ur replies I was like 'Duh!!! Should have checked once more before I posted the question'.
I was probably rushing myself and gearing up for the vacation ahead.
Thanks for your responses guys.
_________________
LIFE is a series of complex calculations, somewhere multiplied by ZERO.
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 » Storing input message into Environment
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.