[ 
https://issues.apache.org/jira/browse/AXIOM-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andreas Veithen resolved AXIOM-465.
-----------------------------------
    Resolution: Invalid
      Assignee: Andreas Veithen

addChild detaches the element from its original parent. This means that your 
code modifies a collection (the children of the original element) while 
iterating over it. That results in undefined behavior. In the current trunk 
(and I believe this was already implemented in 1.2.14), this condition is 
properly detected and the code would throw the following exception:

java.util.ConcurrentModificationException: The current node has been removed 
using a method other than Iterator#remove()

To solve this issue, add the following instruction before the call to addChild:

childItr.remove();

> Axiom not adding child elements in soap header.
> -----------------------------------------------
>
>                 Key: AXIOM-465
>                 URL: https://issues.apache.org/jira/browse/AXIOM-465
>             Project: Axiom
>          Issue Type: Bug
>          Components: LLOM
>    Affects Versions: 1.2.13
>         Environment: Tomcat Java 6/7
>            Reporter: Jayashankar
>            Assignee: Andreas Veithen
>            Priority: Critical
>
> Axiom not honouring the sibling nodes. 
> Crazy stuff is happening in OMAbstractIterator.java in hasNext() and next() 
> methods. 
> Let me brief my issue further..
> I have an xml that needs to go as soap header which is as follows. 
> <ns2:serviceRequestContextHeader xmlns:ns1="http://common.***.***.com/"; 
> xmlns:ns2="http://ods.***.***.com/";>
> <ns1:messageId>0</ns1:messageId> 
> <ns1:requestorDN>****</ns1:requestorDN>
> </ns2:serviceRequestContextHeader> 
> When I sniff the soap envelope with a TCP Mon, the soap header is as follows.
> <soapenv:Header>
> <ns2:serviceRequestContextHeader xmlns:ns2="http://ods.**.***.com/";>
> <ns1:messageId xmlns:ns1="http://common.**.***.com/";>0</ns1:messageId>
> </ns2:serviceRequestContextHeader>
> </soapenv:Header>
> requestorDN is skipped. This used to work fine in Axiom 1.2.10



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to