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 » Saving Message Body in Global Environment

Post new topic  Reply to topic
 Saving Message Body in Global Environment « View previous topic :: View next topic » 
Author Message
mustang
PostPosted: Mon Nov 06, 2006 11:25 am    Post subject: Saving Message Body in Global Environment Reply with quote

Acolyte

Joined: 07 Feb 2006
Posts: 72

I am working in WMB6.
I have a message flow that uses message domain XMLNSC. I want to store the message body in a Global Environment for use at a later time in the flow.

Set Environment.Variables.InputMsg = InputRoot.XMLNSC;

When I do this, all the attributes get converted to elements:

Input Msg:
<NotificationAdminHeader caseNumberKey="1">

Environmental Variable:
<NS15:NotificationAdminHeader>
<caseNumberKey>1</caseNumberKey>

Is there a common work around for this?

Thank you very much.
Back to top
View user's profile Send private message
madi
PostPosted: Mon Nov 06, 2006 12:59 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

try to store as a BLOB and then parse it back when u need it

i think there are some other posts related to this, you should try the search page.

--madi
Back to top
View user's profile Send private message
mustang
PostPosted: Mon Nov 06, 2006 2:26 pm    Post subject: Reply with quote

Acolyte

Joined: 07 Feb 2006
Posts: 72

Thanks!!!!!

I tried search, but I wasn't very successful. I suspect there is a lot of very helpful posts, and I am just not entering the best combination of search criteria. I apologize for that.

Casting it to BLOB works great. I can send it to an output terminal and use the reset content descriptor node to get it back to XMLNSC.

Unfortunately, in addition to the input message, I am storing an array of Web Service response messages (from an HTTP Request node), and iterating through them after receiving the final response.

Set Responses = Cardinality(Environment.Variables.Response[]);

Therefore, I now have a solution (thanks!!!!!) to store each response.

Set Environment.Variables.Response[Environment.Variables.ResponseCount] = Cast(InputRoot.XMLNSC.soap:"Envelope".soap:"Body" As BLOB);

Is there a way I can cast it back to XMLNSC from within the compute node?

Thanks!!!!!!!
Back to top
View user's profile Send private message
madi
PostPosted: Mon Nov 06, 2006 3:19 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

sure u can

found this in search

http://www.mqseries.net/phpBB2/viewtopic.php?t=28471&highlight=parse

--madi
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Nov 06, 2006 4:07 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Try
Code:

SET Environment.Variables.InputMsg VALUE = null;
create lastchild of Environment.Variables.InputMsg Domain 'XMLNSC' name 'XMLNSC';
Set Environment.Variables.InputMsg.XMLNSC = InputRoot.XMLNSC;

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Tue Nov 07, 2006 2:32 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
When I do this, all the attributes get converted to elements:

You forgot to specify the DOMAIN clause when you created your parent node in the local environment.
Back to top
View user's profile Send private message
mustang
PostPosted: Tue Nov 07, 2006 6:53 am    Post subject: Reply with quote

Acolyte

Joined: 07 Feb 2006
Posts: 72

Thanks!!!!!!!!!!!!!!!!!!!!
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 » Saving Message Body in Global 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.