Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7787

NullPointerException from wsdl2java

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.2.6, 3.1.17
    • None
    • None
    • CXF 3.2.5

      Java 8

    • Unknown

    Description

      I am trying to generate Java code against my wsdl file using the wsdl2java utility. I can't figure out where I am going wrong.

      Here is the command line arguments I am using -->

      $ ./wsdl2java.bat -d /c/Users/jmain/generated -client -exsh false -dns true -dex true -validate -verbose /c/Users/jmain/workspace-hub-hhcc/hub/src/main/resources/wsdl/hhcc/LabResultsService.singleWsdl

       

      And here is the output -->

      Loading FrontEnd jaxws ...
      Loading DataBinding jaxb ...
      wsdl2java -d C:/Users/jmain/generated -client -exsh false -dns true -dex true -validate -verbose C:/Users/jmain/workspace-hub-hhcc/hub/src/main/resources/wsdl/hhcc/LabResultsService.singleWsdl
      wsdl2java - Apache CXF 3.2.5

      WSDLToJava Error: java.lang.NullPointerException

      org.apache.cxf.tools.common.ToolException: java.lang.NullPointerException
              at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:420)
              at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:105)
              at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
              at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
              at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:185)
      Caused by: java.lang.NullPointerException
              at org.apache.cxf.common.xmlschema.SchemaCollection.getSchemaByTargetNamespace(SchemaCollection.java:164)
              at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding$3.resolveResource(JAXBDataBinding.java:991)
              at com.sun.org.apache.xerces.internal.util.DOMEntityResolverWrapper.resolveEntity(DOMEntityResolverWrapper.java:117)
              at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntity(XMLEntityManager.java:1081)
              at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.resolveDocument(XMLSchemaLoader.java:657)
              at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.resolveSchema(XSDHandler.java:2056)
              at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructTrees(XSDHandler.java:1012)
              at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:623)
              at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:613)
              at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:572)
              at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:538)
              at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:255)
              at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:638)
              at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.validateSchema(JAXBDataBinding.java:1006)
              at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.addSchemasForServiceInfos(JAXBDataBinding.java:729)
              at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.addSchemas(JAXBDataBinding.java:712)
              at org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:441)
              at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:723)
              at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:267)
              at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
              at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:412)
              ... 4 more

      I've attached the WSDL file.

      Any ideas?

      Attachments

        1. LabResultsService.singleWsdl
          18 kB
          James Main

        Activity

          People

            coheigea Colm O hEigeartaigh
            james.main James Main
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: