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

wsdl2java failes with NPE with void Async Methods

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.4
    • 2.1.5
    • Tooling
    • None
    • JbossWS-CXF 3.1.0 (Uses CXF 2.1.4), Jboss 5.1.0, Fedora 10

    Description

      If a method which ends in Async returns void, and therefore an operation with a name that ends in Async and no output, then running wsdl2java will result in an NPE.

      [exec] wsdl2java -compile -d /home/bkearney/workspace/testclient/./src/main/java -p com.redhat.vdc.client.generated -verbose -classdir /home/bkearney/workspace/testclient/./target/classes http://localhost:8080/backends/wcf?wsdl
      [exec] wsdl2java - Apache CXF 2.1.4
      [exec]
      [exec] Failed to invoke WSDLToJava
      [exec] org.apache.cxf.tools.common.ToolException: java.lang.NullPointerException
      [exec] at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:240)
      [exec] at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:83)
      [exec] at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:103)
      [exec] at org.jboss.wsf.stack.cxf.tools.CXFConsumerImpl.consume(CXFConsumerImpl.java:224)
      [exec] at org.jboss.wsf.spi.tools.cmd.WSConsume.importServices(WSConsume.java:222)
      [exec] at org.jboss.wsf.spi.tools.cmd.WSConsume.main(WSConsume.java:80)
      [exec] Caused by: java.lang.NullPointerException
      [exec] at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProcessor.isAsyncMethod(OperationProcessor.java:182)
      [exec] at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProcessor.processMethod(OperationProcessor.java:76)
      [exec] at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.OperationProcessor.process(OperationProcessor.java:63)
      [exec] at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.PortTypeProcessor.process(PortTypeProcessor.java:143)
      [exec] at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.wsdlDefinitionToJavaModel(WSDLToJavaProcessor.java:88)
      [exec] at org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.WSDLToJavaProcessor.process(WSDLToJavaProcessor.java:60)
      [exec] at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:197)
      [exec] at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:232)
      [exec] ... 5 more

      Attachments

        1. bad.wsdl
          22 kB
          Bryan Kearney

        Activity

          People

            dkulp Daniel Kulp
            bryan.kearney Bryan Kearney
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: