Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-2481

NPE when WSDL types has <schema> minus @targetNamespace with an xsd:import

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Java-SCA-1.3
    • Java-SCA-1.3
    • SCA Java Runtime
    • None
    • r673392

    Description

      WIth a WSDL types with no @targetNamespace, like the following:

      <schema xmlns="http://www.w3.org/2001/XMLSchema">
      <import namespace="http://helloworld" schemaLocation="Hello.xsd"/>
      </schema>

      we get:

      java.lang.NullPointerException
      at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.updateSchemaRefs(Axis2ServiceProvider.java:519)
      at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.addSchemas(Axis2ServiceProvider.java:511)
      at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.createWSDLAxisService(Axis2ServiceProvider.java:478)
      at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.createAxisService(Axis2ServiceProvider.java:369)
      at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.start(Axis2ServiceProvider.java:256)
      at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceBindingProvider.start(Axis2ServiceBindingProvider.java:65)
      at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl$3.run(CompositeActivatorImpl.java:618)
      at java.security.AccessController.doPrivileged(AccessController.java:193)
      at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:616)
      at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:258)

      The problem seems to be the fact that our wsdlDefinition ends up with an XSDefinition corresponding to the null NS. This XSDefinition, then, has no XMLSchema object associated with it, producing the NPE above. I can see in the debugger that we have an XSDefinition with empty ("") NS, which has no problem; we have an XMLSchema for empty NS.

      But apparently this style of authoring <types> presents a problem.

      Note that BP1.1 R2105 says this is valid, and also that wsgen produces WSDL in this style.

      Attachments

        1. 2481.recreate.diff
          2 kB
          Scott Kurz

        Activity

          People

            scnash Simon Nash
            scottkurz Scott Kurz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: