Author |
Message
|
Wim |
Posted: Wed Oct 25, 2006 5:51 am Post subject: [Solved] Output message of 0 bytes when using Reference |
|
|
Newbie
Joined: 25 Oct 2006 Posts: 9 Location: BE, EU
|
Hi,
I use WMB6.0 and made a very simple flow:
MQInput - Compute - MQOutput
The MQInput Message Domain is XML
The input message is:
<Message>
<Number>1</Number>
</Message>
This is in the Main():
...
CALL CopyMessageHeaders();
DECLARE rOutput REFERENCE TO OutputRoot;
SET rOutput.XML.Test.Nbr = '3';
...
In Debug, I can see the OutputRoot.XML.Test.Nbr element with a value of 3, but the output message is 0 bytes.
When I code this instead:
...
CALL CopyMessageHeaders();
SET OutputRoot.XML.Test.Nbr = '3';
...
the output message gets written correctly.
What's wrong with using a Reference?
Thanks,
-=Wim=-
Last edited by Wim on Thu Oct 26, 2006 5:37 am; edited 1 time in total |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Oct 25, 2006 6:17 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Don't use the XML domain.
Use XMLNSC in version 6.
Really.
But it's got nothing to do with your problem.
You need to create OutputRoot.XMLNSC with the XMLNSC domain. This is done when you do a SET on the actual OutputRoot object, but not when you do the SET on a reference to that object.
So either do a simple SET OutputRoot.XMLNSC.Test.Nbr = '3' first, and then use your reference, or do a
Code: |
create field OutputRoot.XMLNSC Domain 'XMLNSC'; |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Wim |
Posted: Wed Oct 25, 2006 6:45 am Post subject: |
|
|
Newbie
Joined: 25 Oct 2006 Posts: 9 Location: BE, EU
|
Hi Jeff,
Thanks for your prompt reply.
I tried your suggestion
create field OutputRoot.XMLNSC Domain 'XMLNSC';
When I save the code, I get this error:
Syntax error. Valid options include: ; AS FROM IDENTITY NAME NAMESPACE PARSE REPEAT TYPE VALUE
-=Wim=- |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Oct 25, 2006 6:47 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Well, I didn't say I'd tested that code.
Maybe a simple search will help you. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
madi |
Posted: Wed Oct 25, 2006 7:58 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
just go to help and look up the create field statement!!!!
--madi |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Oct 25, 2006 1:41 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
or try
Code: |
create Lastchild of OutputRoot domain 'XMLNSC' name 'XMLNSC'. |
_________________ MQ & Broker admin |
|
Back to top |
|
 |
|