|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
ResetContentDescriptor after JavaNode |
« View previous topic :: View next topic » |
Author |
Message
|
mark.luebinski |
Posted: Mon Apr 23, 2007 7:25 am Post subject: ResetContentDescriptor after JavaNode |
|
|
Acolyte
Joined: 27 Mar 2006 Posts: 56
|
Dear Masters,
I must create new Message in JavaNode from scratch.
Code: |
MbElement outRoot = outMessage.getRootElement();
MbElement outBody = outRoot.createElementAsLastChild(MbXMLNSC.PARSER_NAME);
MbElement mqmd = outBody.createElementBefore("MQHMD");
mqmd.createElementAsFirstChild(MbElement.TYPE_NAME_VALUE, "Encoding", new Integer(546));
mqmd.createElementAsFirstChild(MbElement.TYPE_NAME_VALUE, "CCSID", new Integer(850));
mqmd.createElementAsFirstChild(MbElement.TYPE_NAME_VALUE, "Format", "BLOB");
MbElement body = outRoot.getLastChild();
MbElement outParser = outRoot.createElementAsLastChild(MbBLOB.PARSER_NAME);
MbElement outBodyEl2 = outParser.createElementAsLastChild(MbElement.TYPE_NAME_VALUE, "BLOB", line.getBytes());
|
Then I try to put the BLOB in the Message. If I use ResetContentDescriptor directly after JavaNode, I get a Exception
ErrorText : Message has no properties folder
Error Number : BIP0
Field number 1 : MQMD
If I write the Message in new Queue and read this queue with simple In->ResetContentDescriptor ->Out Flow, all works fine!
What is the mistake in the first Flow?
Thank you!
Mark |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Apr 23, 2007 11:04 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Why are you creating both OutputRoot.XMLNSC and OutputRoot.BLOB.BLOB?
Also, you should copy InputRoot.Properties to OutputRoot.Properties.
Or follow the example code in the Info Center for CopyMessageHeaders. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mark.luebinski |
Posted: Tue Apr 24, 2007 12:29 am Post subject: |
|
|
Acolyte
Joined: 27 Mar 2006 Posts: 56
|
Hallo jefflowrey,
you are right, with XMLNSC and BLOB.
But with CopyMessageHeaders - I don't have any Input-Message, this node is the first one! (well, the first one is the Timer-Node, which start this flow evrey 24 hour).
Would this timer-node generate Message with correct header?
Thank you very much!
Mark |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|