geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Gawor (JIRA)" <>
Subject [jira] Resolved: (GERONIMO-4528) Accessing a web service's WSDL throws a NPE
Date Wed, 11 Feb 2009 18:48:59 GMT


Jarek Gawor resolved GERONIMO-4528.

       Resolution: Fixed
    Fix Version/s: 2.2

I committed a fix so that NPE is avoided and things behave the same with CXF and Axis2 (revision

Both Axis2 and CXF consult jax-ws-catalog.xml file to resolve wsdl and schema imports however
it seems like the WSDL4J library ignores imports without the schemaLocation attribute or at
least it doesn't use WSDLLocator to resolve such imports. That's why this import does not
get handled correctly.

> Accessing a web service's WSDL throws a NPE
> -------------------------------------------
>                 Key: GERONIMO-4528
>                 URL:
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: webservices
>    Affects Versions: 2.2
>         Environment: 2.2-SNAPSHOT from SVN
>            Reporter: Janko Heilgeist
>            Assignee: Jarek Gawor
>             Fix For: 2.2
> I've deployed a web service whose WSDL contains various schema imports without schemaLocations:
> {code:xml}<xs:import namespace=""/>{code}
> These imports are resolved via a jax-ws-catalog.xml:
> {code:xml}
> <public
>     publicId=""
>     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(
>         at org.apache.geronimo.axis2.WSDLQueryHandler.updateSchemaImports(
>         at org.apache.geronimo.axis2.WSDLQueryHandler.updateSchemaImports(
>         at org.apache.geronimo.axis2.WSDLQueryHandler.updateDefinition(
>         at org.apache.geronimo.axis2.WSDLQueryHandler.updateDefinition(
>         at org.apache.geronimo.axis2.WSDLQueryHandler.init(
>         at org.apache.geronimo.axis2.WSDLQueryHandler.writeResponse(
>         at org.apache.geronimo.axis2.Axis2WebServiceContainer.processGETRequest(
>         at org.apache.geronimo.axis2.Axis2WebServiceContainer.doService2(
>         at org.apache.geronimo.axis2.Axis2WebServiceContainer.doService(
>         at org.apache.geronimo.axis2.Axis2WebServiceContainer.getWsdl(
>         at org.apache.geronimo.tomcat.TomcatEJBWebServiceContext$EJBWebServiceValve.handle(
>         at org.apache.geronimo.tomcat.TomcatEJBWebServiceContext$EJBWebServiceValve.invoke(
>         at org.apache.catalina.core.StandardHostValve.invoke(
>         at org.apache.catalina.valves.ErrorReportValve.invoke(
>         at org.apache.catalina.core.StandardEngineValve.invoke(
>         at org.apache.catalina.valves.AccessLogValve.invoke(
>         at org.apache.catalina.connector.CoyoteAdapter.service(
>         at org.apache.coyote.http11.Http11Processor.process(
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
>         at$
>         at
> {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.

View raw message