[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-j-dev
Subject:    Proper use of getElementById in Xerces 1.4.4
From:       Danielle Vella <Danielle.Vella () entrust ! com>
Date:       2003-03-28 14:40:29
[Download RAW message or body]

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

[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>Proper use of getElementById in Xerces 1.4.4</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">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.&nbsp; I am able to perform a validating parse on the document corresponding \
to the XML snippet below, but getElementById(&quot;body&quot;) returns null.&nbsp; \
Has anybody encountered this problem before?&nbsp; Since wsu:Id is of type \
&quot;ID&quot;, I would expect this to work.&nbsp; 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.&nbsp;&nbsp;&nbsp; \
</FONT></P>

<P><FONT SIZE=2 FACE="Arial">&lt;?xml version=&quot;1.0&quot; \
encoding=&quot;UTF-8&quot;?&gt;</FONT> <BR><FONT SIZE=2 \
FACE="Arial">&lt;SOAP-ENV:Envelope </FONT> \
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 \
FACE="Arial">xmlns:SOAP-ENV=&quot;<A HREF="http://www.w3.org/2002/12/soap-envelope" \
TARGET="_blank">http://www.w3.org/2002/12/soap-envelope</A>&quot;</FONT> \
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 \
FACE="Arial">xmlns:wsu=&quot;<A HREF="http://schemas.xmlsoap.org/ws/2002/07/utility" \
TARGET="_blank">http://schemas.xmlsoap.org/ws/2002/07/utility</A>&quot;</FONT> \
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 \
FACE="Arial">xmlns:xsi=&quot;<A HREF="http://www.w3.org/2001/XMLSchema-instance" \
TARGET="_blank">http://www.w3.org/2001/XMLSchema-instance</A>&quot;</FONT> \
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 \
FACE="Arial">xsi:schemaLocation=&quot;<A \
HREF="http://www.w3.org/2002/12/soap-envelope" \
TARGET="_blank">http://www.w3.org/2002/12/soap-envelope</A></FONT> <BR><FONT SIZE=2 \
FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp; <A HREF="http://www.w3.org/2002/12/soap-envelope/" \
TARGET="_blank">http://www.w3.org/2002/12/soap-envelope/</A></FONT> \
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial"><A \
HREF="http://schemas.xmlsoap.org/ws/2002/07/utility" \
TARGET="_blank">http://schemas.xmlsoap.org/ws/2002/07/utility</A></FONT> \
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial"><A \
HREF="http://schemas.xmlsoap.org/ws/2002/07/utility/" \
TARGET="_blank">http://schemas.xmlsoap.org/ws/2002/07/utility/</A>&quot;&gt;</FONT> \
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 \
FACE="Arial">&lt;SOAP-ENV:Body wsu:Id=&quot;body&quot;/&gt;</FONT> <BR><FONT SIZE=2 \
FACE="Arial">&lt;/SOAP-ENV:Envelope&gt; </FONT> </P>

<P><FONT SIZE=2 FACE="Arial">Thanks,</FONT>
<BR><FONT SIZE=2 FACE="Arial">Danielle</FONT>
</P>

</BODY>
</HTML>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic