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 » MQSI 2.1- creation of compound elements using cniCreateEleme

Post new topic  Reply to topic
 MQSI 2.1- creation of compound elements using cniCreateEleme « View previous topic :: View next topic » 
Author Message
philipaby
PostPosted: Sun Mar 10, 2002 7:31 pm    Post subject: Reply with quote

Novice

Joined: 09 Mar 2002
Posts: 13

Hi everyone,
I am trying out a custom primitive in MQSI 2.1 and I have a certain problem. I have two MRM message types in a message set. RequestMessage and RequestOutMessage. The primitive is supposed to take in RequestMessage and give out RequestOutMessage. The RequestMessage MRM consists of two elements:

a compound element Request
a simple element Country

The RequestOutMessage consists of two elements two

a compound element RequestOut
a simple element Country

In the custom primitive I make a copy of the input message to the output message and detach the compound element Request from the 'out' message. Then I use cniCreateElement to create the RequestOut compound element and then it's subelements. While debugging the flow, I find that the RequestMessage comes in, the detaching happens and in the out terminal of the custom primitive the elements are noe RequestOut followed by Country. I also set the 'MessageType' property in the Properties folder to the RequestOutMessage. But when this tree goes to the MQOutput terminal I get an exception.

If I try to detach the Request from the incoming message and recreate another Request compound element so that the in and out message have the same structures but different data there is no problem.

And if I leave out the compound type elements and create only simple elements using cniCreateElement()..I can create any message set I want. But it's only when I try to create compund elements using cniCreateElement that I have this problem.

I do a cniSetElementName(to the name of the compound type element)
I do a cniSetElementType(to 16777217 or 0x01000001)

for creating the compound element

For Creating simple elements

I do a cniSetElementName(to the name of the simple element)
I do a cniSetElementType(to 16777216)
I do a cniSetElementChar...(to set the value).

I think for the compund type I have to set a value but I am not sure which to use cniSetElementValue or ByteArray or BitArray or maybe there is something else?

Any help will be appreciated. Thanks very much.

Kind Regards
Aby
Back to top
View user's profile Send private message
kolban
PostPosted: Mon Mar 11, 2002 5:27 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

What is the exception reported when the tree reaches the MQOutput node?
Back to top
View user's profile Send private message
philipaby
PostPosted: Mon Mar 11, 2002 8:38 am    Post subject: Reply with quote

Novice

Joined: 09 Mar 2002
Posts: 13

Hi!
Thanks very much for the reply. I have the exception tree it says

Exception
MessageNumber 2230
ObjectName 86cf
ObjectType ComIbmMQOutputNode
Type 4
FileName f:build...
LineNumber 704
FunctionName ibmMQOutputNode:evaluate
Trace text Caught exception and rethrowing

I could not find a reference to the MessageNumber in the docs...

But this is how the exception shows. I used to have a similar exception happen..maybe not the same message number but an exception in the Output node when I try to put an output message of only simple elements but forgot to change the MessageType in the properties folder to that of the output message type. So I think it has to be something I missed doing here while creating the compund element. I put in the element name and the element type but maybe I missed on the value. But i am not sure what.

Thanks very much.

Aby
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 » MQSI 2.1- creation of compound elements using cniCreateEleme
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.