Author |
Message
|
siri2083 |
Posted: Thu Apr 16, 2009 10:27 pm Post subject: To store only some part of input message into environment va |
|
|
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 |
|
 |
Vitor |
Posted: Thu Apr 16, 2009 11:16 pm Post subject: Re: To store only some part of input message into environmen |
|
|
 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 |
|
 |
siri2083 |
Posted: Thu Apr 16, 2009 11:38 pm Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Thu Apr 16, 2009 11:44 pm Post subject: |
|
|
 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 |
|
 |
rekarm01 |
Posted: Fri Apr 17, 2009 1:45 am Post subject: Re: To store only some part of input message into environmen |
|
|
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 |
|
 |
|