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 » To store only some part of input message into environment va

Post new topic  Reply to topic
 To store only some part of input message into environment va « View previous topic :: View next topic » 
Author Message
siri2083
PostPosted: Thu Apr 16, 2009 10:27 pm    Post subject: To store only some part of input message into environment va Reply with quote

Apprentice

Joined: 16 Apr 2009
Posts: 39

Hi,

I am able to take entire input message to an environment variable. but I want to store only some part of input message into environment variable. The Input message is in XMLNSC domain.

exaplam:

<emp>

<header>
<headId>123</headId>
<name>sjdfsh</name>
</header>

<memberlist>

<member>
<memberID>12345</<memberID>
<menmbername>fggf</menmbername>
</member>

<member>
<memberID>12345</<memberID>
<menmbername>fggf</menmbername>
</member>

<member>
<memberID>12345</<memberID>
<menmbername>fggf</menmbername>
</member>

</memberlist>

</emp>

from the above example, i need header section in to one environment variable. and memberlist section into other environment variable.

please help.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Apr 16, 2009 11:16 pm    Post subject: Re: To store only some part of input message into environmen Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

siri2083 wrote:
i need header section in to one environment variable. and memberlist section into other environment variable.


Fair enough.

siri2083 wrote:
please help.


With what? You've stated that you can put the entire message into a variable, indicating you've grasped the concepts, but not stated why you need help extending the technique to move part of the message. It's not like it's a complex piece of code you're asking about here. What happens when you try it? What have you tried?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
siri2083
PostPosted: Thu Apr 16, 2009 11:38 pm    Post subject: Reply with quote

Apprentice

Joined: 16 Apr 2009
Posts: 39

Hi,

thanks for your reply. In oder to test a subflow, i need to set the environment varibles in a master flow as i mentioned above.

i have tried with below statements :

SET Environment.Variables.Response.serviceHeader = "InputRoot"."XMLNSC".(XML.Element)[1]."Header";

and

SET Environment.Variables.RetrieveResponse.partyPerson.membership[] = InputRoot.XMLNSC.MembershipTransaction.Body.ListOfMembership;

none of the above statements works. nothing is present in the environment variables.

Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Apr 16, 2009 11:44 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

siri2083 wrote:
none of the above statements works. nothing is present in the environment variables.


I can't say I'm really that surprised!

I can't help but notice that the fields you reference (Header, MembershipTransaction, etc) are noticeably absent in the message sample you've provided. Hence what you're getting in the Environment variables is exactly those values in the tree.

Either explain how you think those values are being mapped, or sit down with the ESQL manual and a good book on XML structure.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Fri Apr 17, 2009 1:45 am    Post subject: Re: To store only some part of input message into environmen Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

siri2083 wrote:
Code:
SET Environment.Variables.Response.serviceHeader = "InputRoot"."XMLNSC".(XML.Element)[1]."Header";

(XML.Element) should probably be (XMLNSC.Folder), or some other XMLNSC parser constant.

"Please" "don't" "use" "double-quotes" "unnecessarily".
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 » To store only some part of input message into environment va
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.