Accessing a web service's WSDL throws a NPE
-------------------------------------------

                 Key: GERONIMO-4528
                 URL: https://issues.apache.org/jira/browse/GERONIMO-4528
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
    Affects Versions: 2.2
         Environment: 2.2-SNAPSHOT from SVN
            Reporter: Janko Heilgeist


I've deployed a web service whose WSDL contains various schema imports without 
schemaLocations:

{code:xml}<xs:import 
namespace="http://schemas.ggf.org/jsdl/2005/11/jsdl"/>{code}

These imports are resolved via a jax-ws-catalog.xml:

{code:xml}
<public
    publicId="http://schemas.ggf.org/jsdl/2005/11/jsdl";
    uri="schemas/ext/jsdl/jsdl-1.0.xsd"/>
{code}

Accessing this WSDL via Geronimo with the ?wsdl-URL results in a 
NullPointerException on Tomcat/Axis. The code tries to update the 
schemaLocation to a server-local URL and, for this reason, retrieves the 
imported schema. But it never checks for a valid return value. Jetty/CXF simply 
copies these import-elements to the output WSDL without further ado.

{code}
2009-02-06 08:02:21,239 ERROR [Axis2WebServiceContainer] Exception occurred 
while trying to invoke service method doService()
java.lang.NullPointerException
        at 
org.apache.geronimo.axis2.WSDLQueryHandler.updateSchemaImports(WSDLQueryHandler.java:244)
        at 
org.apache.geronimo.axis2.WSDLQueryHandler.updateSchemaImports(WSDLQueryHandler.java:252)
        at 
org.apache.geronimo.axis2.WSDLQueryHandler.updateSchemaImports(WSDLQueryHandler.java:268)
        at 
org.apache.geronimo.axis2.WSDLQueryHandler.updateDefinition(WSDLQueryHandler.java:230)
        at 
org.apache.geronimo.axis2.WSDLQueryHandler.updateDefinition(WSDLQueryHandler.java:219)
        at 
org.apache.geronimo.axis2.WSDLQueryHandler.init(WSDLQueryHandler.java:158)
        at 
org.apache.geronimo.axis2.WSDLQueryHandler.writeResponse(WSDLQueryHandler.java:108)
        at 
org.apache.geronimo.axis2.Axis2WebServiceContainer.processGETRequest(Axis2WebServiceContainer.java:366)
        at 
org.apache.geronimo.axis2.Axis2WebServiceContainer.doService2(Axis2WebServiceContainer.java:306)
        at 
org.apache.geronimo.axis2.Axis2WebServiceContainer.doService(Axis2WebServiceContainer.java:243)
        at 
org.apache.geronimo.axis2.Axis2WebServiceContainer.getWsdl(Axis2WebServiceContainer.java:190)
        at 
org.apache.geronimo.tomcat.TomcatEJBWebServiceContext$EJBWebServiceValve.handle(TomcatEJBWebServiceContext.java:213)
        at 
org.apache.geronimo.tomcat.TomcatEJBWebServiceContext$EJBWebServiceValve.invoke(TomcatEJBWebServiceContext.java:187)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:595)
{code}

IMHO, both assemblies should first consult an existing jax-ws-catalog.xml to 
resolve the schemaLocations. If this doesn't work they should copy the import 
verbatim and let the client resolve via its own catalog.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to