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

NPE while namespace creation in

    XMLWordPrintableJSON

Details

    • Patch Available

    Description

      when the wsdl is generated from a java interface, and the namespace pairs generated - I get a nullpointer exception in my enviroment.

      Caused by: java.lang.NullPointerException
      at org.apache.tuscany.sca.interfacedef.wsdl.java2wsdl.Java2WSDLHelper.promote(Java2WSDLHelper.java:196)
      at org.apache.tuscany.sca.interfacedef.wsdl.java2wsdl.Java2WSDLHelper.readInlineSchemas(Java2WSDLHelper.java:236)
      at org.apache.tuscany.sca.interfacedef.wsdl.java2wsdl.Java2WSDLHelper.createWSDLInterfaceContract(Java2WSDLHelper.java:145)
      at org.apache.tuscany.sca.binding.ws.axis2.Axis2ReferenceBindingProvider.<init>(Axis2ReferenceBindingProvider.java:51)
      at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingProviderFactory.createReferenceBindingProvider(Axis2BindingProviderFactory.java:53)
      at org.apache.tuscany.sca.binding.ws.axis2.Axis2BindingProviderFactory.createReferenceBindingProvider(Axis2BindingProviderFactory.java:40)
      at org.apache.tuscany.sca.provider.DefaultProviderFactoryExtensionPoint$LazyBindingProviderFactory.createReferenceBindingProvider(DefaultProviderFactoryExtensionPoint.java:190)
      at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.addReferenceBindingProvider(CompositeActivatorImpl.java:176)
      at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:133)
      at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.activate(CompositeActivatorImpl.java:752)

      this happens when the nodeMap from NamedNodeMap nodeMap = root.getAttributes(); is null - and when the element.getNodeName == "#document" - and hence has no attributes.

      adding a nullcheck fixes this ..

      Attachments

        1. Java2WSDLHelper.java
          20 kB
          clemens utschig

        Activity

          People

            scnash Simon Nash
            clemens.utschig clemens utschig
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: