Author |
Message
|
pcelari |
Posted: Wed Jan 24, 2007 5:44 am Post subject: how to view mapping node's ESQL code? |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
I'm trying to understand how namespace is handled in compute node.
My input msg is TDS, output is an MRM (XML1), with target namespace http://ws.ei.myco.com/MC.
I use a compute node to assign fields.
SET OutputRoot.XML1.Message.MessageHeader.ServiceName=
InputRoot.ServiceName;
However, I got exception "Failed to locate constant".
I do have a working msgflow using mapping node. So I would like to see the ESQL code that performs the mapping. How can I view the ESQL code of a mapping node?
thanks, _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jan 24, 2007 5:54 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Why would you possibly use "OutputRoot.XML1"? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
pcelari |
Posted: Wed Jan 24, 2007 6:35 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
jefflowrey wrote: |
Why would you possibly use "OutputRoot.XML1"? |
thanks for pointing right to the cause. a true GM. I removed XML1 and use the following:
SET OutputRoot.mc:Message.MessageHeader.ServiceName=
InputRoot.ServiceName;
this successfully assigned part of the input to Message.MRM.ServiceName. I wonder why if I have to put that "mc:" in front of every node in the tree for it to assign value to the right destination node. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jan 24, 2007 6:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
pcelari |
Posted: Wed Jan 24, 2007 11:36 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
many thanks for the link. Following it, I understand that I need to declare namespace at ESQL code level when the msgset is namespace enabled - my case.
here's my code:
...
declare mc name space 'http://ei.myco.com/MC';
SET OutputRoot.mc:Message.mc:MessageHeader.mb:BusinessService=InputBody.ServiceName;
However, I got recoverable exception, with
Text=Failed to locate constant
insert.Text=Message
I don't get why "Message" is singled out.
Here's my envelop for the output msg:
<?xml version="1.0" encoding="UTF-8"?>
<mc:Message xmlns:mc="http://ei.myco.com/MC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<mc:MessageHeader>
<mc:BusinessService></mc:BusinessService>
<mc:ServiceProvider></mc:ServiceProvider>
</mc:MessageHeader>
<mc:BusinessData>
</mc:BusinessData>
</mc:Message> _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jan 24, 2007 11:48 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Because you have to use OutputRoot.MRM!
Set OutputRoot.MRM.mc:Message.mc:MessageHeader...
Or possibly OutputRoot.MRM.mc:MessageHeader....
 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
pcelari |
Posted: Wed Jan 24, 2007 12:30 pm Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
I tried that as well, but I got warning from problem pane:
Unresolvable message field reference "OutputRoot.MRM.mb:Message ...
anything else could I be missing?
thanks a lot. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
sarat |
Posted: Wed Jan 24, 2007 10:29 pm Post subject: |
|
|
 Centurion
Joined: 29 Jun 2005 Posts: 136 Location: India
|
Igore the warnings..it'll show while using MRM!!! _________________ With Regards,
Sarat. |
|
Back to top |
|
 |
pcelari |
Posted: Thu Jan 25, 2007 8:29 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
thanks for the tip. Yes, just ignoring it did the trick.
I wonder why should there be warning in the first place. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
elvis_gn |
Posted: Thu Jan 25, 2007 9:08 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
|
Back to top |
|
 |
|