You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by W Strater <ws...@yahoo.com> on 2007/09/13 16:47:49 UTC

Bug 40819

I am still getting a null pointer exception in the IdResolver.isElement.

The problem is the following two lines:

String name=n.getLocalName();
if (name.length()>2) {


The problem is that the node does not have a local name.

I am using Rampart 1.2 that is built on WSS4J 1.5.2 that uses XML Security 1.4.0. Rampart also uses XML Beans that brings in AXIOM for XML 

I tried use WSU namespace for the Id and had problems elsewhere. Removing the namespace for the Id causes a problem here.

Wes.



RE: Bug 40819

Posted by Scott Cantor <ca...@osu.edu>.
> The problem is that the node does not have a local name.

You can't have a valid DOM if that's the case.

> I tried use WSU namespace for the Id and had problems elsewhere. Removing
> the namespace for the Id causes a problem here.

You can't just decide whether it has a namespace or not, the schema or
specification defining the XML content containing the ID tells you that.

-- Scott



Re: Bug 40819

Posted by Raul Benito <ra...@apache.org>.
100% agree with scott.

public String <http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html>
*getLocalName*()

Returns the local part of the qualified name of this node.
For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes
created with a DOM Level 1 method, such as createElement from the
Documentinterface, this is always
null.

*Since:*DOM Level 2

So if you use DOM level 1, the c14n will fail in some other strange ways.
Please check that the DOM parser is doing it work.

On 9/13/07, Scott Cantor <ca...@osu.edu> wrote:
>
> > The problem is that the node does not have a local name.
>
> You can't have a valid DOM if that's the case.
>
> > I tried use WSU namespace for the Id and had problems elsewhere.
> Removing
> > the namespace for the Id causes a problem here.
>
> You can't just decide whether it has a namespace or not, the schema or
> specification defining the XML content containing the ID tells you that.
>
> -- Scott
>
>
>


-- 
http://r-bg.com