ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ResetContentDescriptor after JavaNode

Post new topic  Reply to topic
 ResetContentDescriptor after JavaNode « View previous topic :: View next topic » 
Author Message
mark.luebinski
PostPosted: Mon Apr 23, 2007 7:25 am    Post subject: ResetContentDescriptor after JavaNode Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Mon Apr 23, 2007 11:04 am    Post subject: Reply with quote

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
View user's profile Send private message
mark.luebinski
PostPosted: Tue Apr 24, 2007 12:29 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ResetContentDescriptor after JavaNode
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.