DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42986>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42986

           Summary: The </#document> node inserted at the end of SOAPEnvelop
           Product: Security
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Canonicalization
        AssignedTo: security-dev@xml.apache.org
        ReportedBy: [EMAIL PROTECTED]


When Oracle's xmlparserv2 is used along with Axis WS client and WSS4J, the 
SOAPEnvelop generated after xmlsecurity processing is faulty. It puts the 
</#document> tag.

I looked thru the xmlsecurity and find out the problem is in method 
canonicalizeSubTree 
oforg.apache.xml.security.c14n.implementations.CanonicalizerBase.java. After 
line #321 it doesnt check if the parentNode type is not Node.DOCUMENT_NODE and 
it appends in the writer.

The check I added:

...
after #321

                while (sibling==null  && parentNode!=null) {            
                                                
                                if(parentNode.getNodeType() != 
Node.DOCUMENT_NODE)
                                {
                                        writer.write(_END_TAG);
                                        UtfHelpper.writeByte(((Element)
parentNode).getTagName(),writer,cache);        
                                        writer.write('>');
                                }
.....

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to