|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
copy() and copyElementTree() in java compute |
« View previous topic :: View next topic » |
Author |
Message
|
alewis |
Posted: Sun Aug 20, 2006 6:11 pm Post subject: copy() and copyElementTree() in java compute |
|
|
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 |
|
 |
kimbert |
Posted: Mon Aug 21, 2006 2:21 am Post subject: |
|
|
 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 |
|
 |
alewis |
Posted: Mon Aug 21, 2006 3:34 am Post subject: |
|
|
Novice
Joined: 20 Aug 2006 Posts: 13
|
We are using MB 6, Fix pack 1 |
|
Back to top |
|
 |
kimbert |
Posted: Mon Aug 21, 2006 4:16 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
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
|
|
|
|