You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Jarek Gawor (JIRA)" <ji...@apache.org> on 2009/02/11 19:48:59 UTC

[jira] Resolved: (GERONIMO-4528) Accessing a web service's WSDL throws a NPE

     [ https://issues.apache.org/jira/browse/GERONIMO-4528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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 743444).

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: https://issues.apache.org/jira/browse/GERONIMO-4528
>             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="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.