axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Ling" <jeffl...@google.com>
Subject patch for org.apache.axiom.om.impl.serialize.StreamingOMSerializer
Date Fri, 02 Jun 2006 23:16:25 GMT
Hi guys,

I got NullpointerException with the request content:

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
<http://www.google.com/url?sa=D&q=http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fenvelope%2F>"><soapenv:Header
/><soapenv:Body><ns1:GetListItems xmlns:ns1="
http://schemas.microsoft.com/sharepoint/soap/<http://www.google.com/url?sa=D&q=http%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2Fsoap%2F>"><listName
xmlns=" http://schemas.microsoft.com/sharepoint/soap/<http://www.google.com/url?sa=D&q=http%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2Fsoap%2F>">{F8AC172B-2763-4898-B322-935BECA90900}</listName><Query
/><QueryOptions><ViewAttributes Scope="Recursive"
/></QueryOptions></ns1:GetListItems></soapenv:Body></soapenv:Envelope>


I traced down to StreamingOMSerializer::serializeAttributes

            namespaceName = reader.getAttributeNamespace(i);
              writerPrefix
=writer.getNamespaceContext().getPrefix(namespaceName);

In this case, "ViewAttributes"'s attribute namspace is null, and
namspacecontext.getPrefix caused exception.

Here is my fix:

            namespaceName = reader.getAttributeNamespace(i);
            if (namespaceName != null)
              writerPrefix =writer.getNamespaceContext
().getPrefix(namespaceName);

            if (namespaceName != null && !"".equals(namespaceName)){
                //prefix has already being declared but this particular
attrib has a


File is attached. I am not sure whether this group is responsible for
axiom, or I should submit to some other list? Please advice. (seems to me
ther only other list is "commons".)

Thanks,
Jeff

Mime
View raw message