Author |
Message
|
mustang |
Posted: Mon Nov 06, 2006 11:25 am Post subject: Saving Message Body in Global Environment |
|
|
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 |
|
 |
madi |
Posted: Mon Nov 06, 2006 12:59 pm Post subject: |
|
|
 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 |
|
 |
mustang |
Posted: Mon Nov 06, 2006 2:26 pm Post subject: |
|
|
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 |
|
 |
madi |
Posted: Mon Nov 06, 2006 3:19 pm Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 06, 2006 4:07 pm Post subject: |
|
|
 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 |
|
 |
kimbert |
Posted: Tue Nov 07, 2006 2:32 am Post subject: |
|
|
 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 |
|
 |
mustang |
Posted: Tue Nov 07, 2006 6:53 am Post subject: |
|
|
Acolyte
Joined: 07 Feb 2006 Posts: 72
|
Thanks!!!!!!!!!!!!!!!!!!!! |
|
Back to top |
|
 |
|