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 » copy() and copyElementTree() in java compute

Post new topic  Reply to topic
 copy() and copyElementTree() in java compute « View previous topic :: View next topic » 
Author Message
alewis
PostPosted: Sun Aug 20, 2006 6:11 pm    Post subject: copy() and copyElementTree() in java compute Reply with quote

Novice

Joined: 20 Aug 2006
Posts: 13

Would like to know the difference between copy() and copyElementTree() and when can they be used.

In the sample code, calling copy() on an element(header) causes a severe Abend error.
[MbElement ExceptionElement=outBody.createElementAsLastChild(MbElement.TYPE_NAME,"Exception",null);
MbElement header=inBody.getFirstElementByPath("Header");
MbElement outHeader=ExceptionElement.createElementAsLastChild(MbElement.TYPE_NAME,"Header",null);
outHeader.addAsLastChild(header.copy());]


The incoming message is of type MRM and the Header element defined in the MRM is of type "anyType". If there are elements within <Header>, calling copyElementTree() does not copy all the elements. e.g
<MRM>
<A>1</A>
<Header><C><D>1</D></C></Header>
</MRM>

Calling copyElementTree() on Header results in <C></C>. Child D and its contents are not copied.
However, if the same message is parsed using the XML parser and not MRM, calling copyElementTree() copies all the contents of element Header e.g.
<XML>
<!—In the MRM parser, ELEMENT is represented as MRM-- >
<ELEMENT>
<A>1</A>
<Header><C><D>1</D></C></Header>
</ELEMENT>
Calling copyElementTree() on Header results in <C><D>1</D></C>
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Aug 21, 2006 2:21 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

What version of the broker are you on?
Are you up to date with fix packs?
Back to top
View user's profile Send private message
alewis
PostPosted: Mon Aug 21, 2006 3:34 am    Post subject: Reply with quote

Novice

Joined: 20 Aug 2006
Posts: 13

We are using MB 6, Fix pack 1
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Aug 21, 2006 4:16 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

This looks like at least one defect to me. Contact your IBM service representative and/or get a PMR raised. Make sure you mention both problems
1. The severe abend ( if you can reproduce this, it would be very helpful. Make sure you keep the abend files around for the service team to look at )
2. The difference in behaviour of copyElementTree() when used with XML and MRM domains.
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 » copy() and copyElementTree() in java compute
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.