I am not getting this exception:

javax.xml.stream.XMLStreamException: NamespaceURI cannot be null

If anyone can help, that would be great.

I recently upgraded from an April snapshot to CXF-2.1, and now I get a
stack trace whenever I 
do an HTTP GET for the WSDL from my published endpoint:
 
 
 
WARNING: org.apache.cxf.transport.http.WSDLQueryHandler Exception caught
writing response.
org.apache.cxf.transport.http.WSDLQueryException: Exception occurred
while trying to process
http://localhost:8080/wsstest/services/secadmin?wsdl
        at
org.apache.cxf.transport.http.WSDLQueryHandler.writeResponse(WSDLQueryHa
ndler.java:229)
        at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletControl
ler.java:137)
        at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFSe
rvlet.java:170)
[...]
Caused by: javax.xml.stream.XMLStreamException: NamespaceURI cannot be
null
        at
com.sun.xml.stream.writers.XMLStreamWriterImpl.writeAttribute(XMLStreamW
riterImpl.java:620)
        at
org.apache.cxf.staxutils.StaxUtils.writeElement(StaxUtils.java:520)
        at
org.apache.cxf.staxutils.StaxUtils.writeElement(StaxUtils.java:440)
        at
org.apache.cxf.staxutils.StaxUtils.writeDocument(StaxUtils.java:421)
        at
org.apache.cxf.staxutils.StaxUtils.writeDocument(StaxUtils.java:411)
        at
org.apache.cxf.staxutils.StaxUtils.writeNode(StaxUtils.java:560)
        at
org.apache.cxf.transport.http.WSDLQueryHandler.writeResponse(WSDLQueryHa
ndler.java:226)


I traced the problem to org.apache.cxf.staxutils.StaxUtils.java, lines
484-488:

       } else {
//            System.out.println("Calling writeStartElement for local
name : " 
//            + localName + " URI: " + ns + " Prefix :" + prefix);
            writer.writeStartElement(prefix, localName, ns);
        }

The values for the "writeStartElement" are:
prefix = "wsdl"
localname = "definitions"
ns = "http://schemas.xmlsoap.org/wsdl/";

The start element looks like:

<wsdl:definitions name="SecAdmin"
targetNamespace="urn:secadmin.svcscore.ibd.ms.com" 
    xmlns="http://schemas.xmlsoap.org/wsdl/"; 
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
    xmlns:tns="urn:secadmin.svcscore.ibd.ms.com"
    xmlns:x1="urn:secadmin.svcscore.ibd.ms.com/types"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.

Reply via email to