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

Andreas Veithen resolved WSCOMMONS-435.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: Axiom 1.2.9

I applied your patch and added some test cases. Thanks for your contribution!

> org.apache.axiom.om.impl.dom.ParentNode.removeChild(Node) is broken
> -------------------------------------------------------------------
>
>                 Key: WSCOMMONS-435
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-435
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>    Affects Versions: Axiom 1.2.8
>         Environment: Axis-1.4.1, Addressing-1.41, Sandesha2-1.3, Rampart-1.4
>            Reporter: Andrei Ivanov
>            Assignee: Andreas Veithen
>            Priority: Blocker
>             Fix For: Axiom 1.2.9
>
>         Attachments: WSCOMMONS-435.patch
>
>
> Parent:
> <soapenv:Header
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>
>      <wsse:Security
> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
> soapenv:mustUnderstand="1" />
>      
> <wsa:To>http://192.168.1.5:6060/axis2/services/personaldataserv...@286914895/</wsa:To>
>      
> <wsa:ReplyTo><wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address></wsa:ReplyTo>
>      <wsa:MessageID>urn:uuid:E3FC5985317BCF16351233758322948</wsa:MessageID>
>      
> <wsa:Action>http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse</wsa:Action>
>      <wsa:RelatesTo>urn:uuid:A07FCCC1972C7E06671233758319824</wsa:RelatesTo>
> </soapenv:Header>
> securityHeader:
> <wsse:Security 
> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> soapenv:mustUnderstand="1" />
> Node parent = securityHeader.getParentNode();
> parent.removeChild(securityHeader);
> org.apache.axiom.om.impl.dom.ParentNode.removeChild(Node) is
> called and it gets to this, begining with line 482:
> if (this.firstChild == tempNode) {
>        // If this is the first child
>        this.firstChild = null;
>        this.lastChild = null;
>        tempNode.parentNode = null;
> }
> tempNode is the security header and it is equal to the firstChild of
> the envelope header.
> The firstChild is removed... then the lastChild(which is the relatesTo
> child) is removed...
> The result is this:
> <soapenv:Header
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:wsa="http://www.w3.org/2005/08/addressing"; />

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to