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 IndexWebSphere Message Broker (ACE) SupportGENERICPROPERTYPARSER

Post new topicReply to topic
GENERICPROPERTYPARSER View previous topic :: View next topic
Author Message
PEPERO
PostPosted: Thu Apr 24, 2014 2:25 am Post subject: GENERICPROPERTYPARSER Reply with quote

Disciple

Joined: 30 May 2011
Posts: 177

Hi all;
How can i manually create an empty property tree of type GENERICPROPERTYPARSER in the output message from a JCN ?
Back to top
View user's profile Send private message
PEPERO
PostPosted: Thu Apr 24, 2014 2:37 am Post subject: Re: GENERICPROPERTYPARSER Reply with quote

Disciple

Joined: 30 May 2011
Posts: 177

For Example
Quote:


MbElement properties = outRoot.createElementAsLastChild(MbElement.TYPE_NAME, "Properties", null);
properties.createElementAsLastChild(MbElement.TYPE_NAME_VALUE, "MessageSet", "J5KCP28002001");
properties.createElementAsLastChild(MbElement.TYPE_NAME_VALUE, "MessageType", "msg_FaultMessageType");
properties.createElementAsLastChild(MbElement.TYPE_NAME_VALUE, "MessageFormat", "XML1");
.
.
.


wouldn't actually be the response because it doesn't inherit the attributes of a property tree generated with an input node.
Back to top
View user's profile Send private message
Esa
PostPosted: Thu Apr 24, 2014 2:40 am Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Did you already try something like
Code:
outMessage.getRootElement().createElementAsLastChild('GENERICPROPERTYPARSER');
Back to top
View user's profile Send private message
Esa
PostPosted: Thu Apr 24, 2014 2:44 am Post subject: Re: GENERICPROPERTYPARSER Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

PEPERO wrote:

wouldn't actually be the response because it doesn't inherit the attributes of a property tree generated with an input node.


If you want to inherit the properies from the input message, you shouldn't "create an empty property tree" but copy the Properties element from the input message.
Back to top
View user's profile Send private message
PEPERO
PostPosted: Thu Apr 24, 2014 2:54 am Post subject: Reply with quote

Disciple

Joined: 30 May 2011
Posts: 177

For some reasons i don't want to make copy the output property tree from the input property one and i want to make the output property tree from scratch.
So the problem is that using
Quote:

outRoot.createElementAsLastChild(MbElement.TYPE_NAME, "Properties", null);

statement doesn't make a valid property tree. I mean can i actually make a property tree with all the related subelemnts from scratch or i must copy it from the input tree?
Back to top
View user's profile Send private message
Esa
PostPosted: Thu Apr 24, 2014 2:55 am Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Again
Esa wrote:
Did you already try something like
Code:
outMessage.getRootElement().createElementAsLastChild('GENERICPROPERTYPARSER');
Back to top
View user's profile Send private message
PEPERO
PostPosted: Thu Apr 24, 2014 3:08 am Post subject: Reply with quote

Disciple

Joined: 30 May 2011
Posts: 177

I've tried it but as i expected the problem exists.
Using a trace node, the property tree generated from an input node shows it's of type GENERICPROPERTYPARSER and also it has been allocated an object handler with the value of 0x8f4123180¨
Quote:

Root: ( Ý'GENERICROOT' : 0x8ea7e5b70¨
(0x01000000:Name):Properties = ( Ý'GENERICPROPERTYPARSER' : 0x8f4123180¨
.
.
.


But when i use the create element command no handler and no type is displayed.
Quote:

Root: ( Ý'MQROOT' : 0x916226aa0¨
(0x01000000:Name ):Properties = (
.
.
.


Last edited by PEPERO on Thu Apr 24, 2014 3:30 am; edited 1 time in total
Back to top
View user's profile Send private message
Esa
PostPosted: Thu Apr 24, 2014 3:18 am Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Ok, I think GENERICPROPERTYPARSER may be an interface or something else that cannot be directly instantiated.

Try if 'MQPROPERTYPARSER' works. Because your root seems to be MQROOT.
Back to top
View user's profile Send private message
PEPERO
PostPosted: Thu Apr 24, 2014 3:22 am Post subject: Reply with quote

Disciple

Joined: 30 May 2011
Posts: 177

Thanks so much Esa.
I was trying

Quote:

outRoot.createElementAsLastChild(MbElement.TYPE_NAME, "GENERICPROPERTYPARSER", null);


but when i used

Quote:

outRoot.createElementAsLastChild("GENERICPROPERTYPARSER");

it became fine.
But do you know why?

i've also tried
Quote:

outRoot.evaluateXPath("?GENERICPROPERTYPARSER")

and it failed just like the command within the first quote.
Back to top
View user's profile Send private message
Esa
PostPosted: Thu Apr 24, 2014 3:49 am Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

PEPERO wrote:


but when i used

Quote:

outRoot.createElementAsLastChild("GENERICPROPERTYPARSER");

it became fine.
But do you know why?


Yes. If you want to create a parser, you must use the createElement... method that takes one argument only. Otherwise you will end up with an ordinary Element that is not associated with a parser.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Apr 24, 2014 5:16 am Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

If you want to make it generic and complicated, you can retrieve the class name of the parser from any of the Input.Properties tree elements, get the Class and use reflection to instantiate the static parser_name field...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportGENERICPROPERTYPARSER
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.