Author |
Message
|
dan2WMB |
Posted: Fri Aug 06, 2010 4:29 am Post subject: Need help to copy XML message in ESQL |
|
|
Novice
Joined: 06 Aug 2010 Posts: 12
|
Hi,
Im new to WMB.
I have the below requirement in my application to write an ESQL code.
1.Copy the XML message from InputRoot to some varibale(result should be XML format)
2.Process the copied XML message by removing/adding tags.
3.Write the processed message to OutputRoot.
I tried to use Environment variable for the above scenario.But no luck.
Can any one help me how to achieve this? |
|
Back to top |
|
 |
Vitor |
Posted: Fri Aug 06, 2010 4:34 am Post subject: Re: Need help to copy XML message in ESQL |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
dan2WMB wrote: |
I tried to use Environment variable for the above scenario.But no luck |
Why?.
dan2WMB wrote: |
Can any one help me how to achieve this? |
Go directly from InputRoot to OutputRoot, either only copying what you need or removing unneeded tags from the output, depending on which yields less code.
I don't see why you're using the Environment tree at all, and don't know why it isn't working as you've not seen fit to post any details about why you had no luck. But I'd theorise you didn't associate the proper domain with the variable.
Please read the guidance for new posters on what to tell us. More information in, better advice out. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Aug 06, 2010 4:34 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
And if you've not had formal training on WMB, seek some. It's not a simple product. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
dan2WMB |
Posted: Fri Aug 06, 2010 4:58 am Post subject: |
|
|
Novice
Joined: 06 Aug 2010 Posts: 12
|
thanks for your info Vitor.I'l follow the same.
I can go directly from InputRoot to OutputRoot, but my requirement is little different.
The input message is large and i have to handle so many errors in the message. If any errors found in the message,form an errored XML messages.Finally write the errored messages to error queue and the right message to the output queue.Because this to be handled in a single message iteration.
In this case,what i thought was, i can form an error XML messages using some variables and then finally write them to the respective OutputRoot.
I can achive this requirement by iterating the input message more times for each error handling check. But it hits the performance due to large message size and more iteration times.So i wanted to handle that in a single message iteration. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Aug 06, 2010 5:26 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
dan2WMB wrote: |
I can go directly from InputRoot to OutputRoot, but my requirement is little different.
The input message is large and i have to handle so many errors in the message. If any errors found in the message,form an errored XML messages.Finally write the errored messages to error queue and the right message to the output queue.Because this to be handled in a single message iteration.
In this case,what i thought was, i can form an error XML messages using some variables and then finally write them to the respective OutputRoot. |
Fair point. I'd have used LocalEnvironment rather than Environment but that's a mostly stylistic point & doesn't change the basic principle.
You also still haven't said why you're having no luck so there's really nothing else to say. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
dan2WMB |
Posted: Fri Aug 06, 2010 5:43 am Post subject: |
|
|
Novice
Joined: 06 Aug 2010 Posts: 12
|
can you please explain me how to save the XML message in LocalEnvironment and access the tag values and tag attributes from the saved XML message? |
|
Back to top |
|
 |
Vitor |
Posted: Fri Aug 06, 2010 5:57 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
dan2WMB wrote: |
can you please explain me how to save the XML message in LocalEnvironment and access the tag values and tag attributes from the saved XML message? |
It needs to be associated with the correct message domain (XMLNSC most probably). The InfoCenter (link at the top of this page) gives a description & syntax for this & everything else you'll need. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Aug 06, 2010 7:20 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
my requirement is little different.
The input message is large and i have to handle so many errors in the message. If any errors found in the message,form an errored XML messages.Finally write the errored messages to error queue and the right message to the output queue.Because this to be handled in a single message iteration. |
Q1: What type of 'errors' are you looking for?
Q2: Can they be described using an XML Schema? ( if not, why not? )
Q3: How large is 'large'? |
|
Back to top |
|
 |
|