Title: Proper use of getElementById in Xerces 1.4.4

Hi,

I'm trying to sign the body of a SOAP message and to do this, I would like to make use of the org.w3c.dom.Document.getElementById(String id) method.  I am able to perform a validating parse on the document corresponding to the XML snippet below, but getElementById("body") returns null.  Has anybody encountered this problem before?  Since wsu:Id is of type "ID", I would expect this to work.  By the way, I'm pretty sure the wsu schema is being validated because I've tried violating this schema inside the SOAP Body and I'm unable to parse with validation in this case.   

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
        xmlns:SOAP-ENV="http://www.w3.org/2002/12/soap-envelope"
        xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.w3.org/2002/12/soap-envelope
                http://www.w3.org/2002/12/soap-envelope/
                http://schemas.xmlsoap.org/ws/2002/07/utility
                http://schemas.xmlsoap.org/ws/2002/07/utility/">
        <SOAP-ENV:Body wsu:Id="body"/>
</SOAP-ENV:Envelope>

Thanks,
Danielle

Reply via email to